Page History
...
Code Block |
---|
// Create the list
Handle = SRP_List_Create("Apple Pie,Banana Cream Pie,Chocolate Cake,Pie", ",")
// This will return "Pie", since the search is looking for elements that entirely match "pie"
ReducedHandle1 = SRP_List_Reduce(Handle, "pie", 0)
// This will return "Apple Pie,Banana Cream Pie,Pie", since the search is looking for any element containing "pie" anywhere
ReducedHandle2 = SRP_List_Reduce(Handle, "pie", 1)
// Play nice with memory
SRP_List_Release(Handle)
SRP_List_Release(ReducedHandle1)
SRP_List_Release(ReducedHandle2) |