Page History
...
The SearchIndex parameter tells the Match routine where to start the search. Set it to 1 or 0 to start at the beginning of the list. If, for example, you set the StartIndex to 5, then the search will begin at the fifth element and proceed down the list. If omitted, the search will start at the beginning of the list.
The Match service is slower than the Locate service, because the Locate service uses case sensitive indexing for immediate results. If you need to find case sensitive exact matches, then Locate will be much faster.
Examples
Code Block |
---|
// Create the list Handle = SRP_List("Create", "Apple Pie,Banana Cream Pie,Chocolate Cake,Pie", ",") // This will return 4, since the search is looking for an element whose entire element matches "pie" Index = SRP_List("Match", Handle, "pie", 1, "MatchAll") // This will return 1, since the search is looking for an element containing "pie" anywhere Index = SRP_List("Match", Handle, "pie") // This will return 2, since the search starts at index 2 Index = SRP_List("Match", Handle, "pie", 2, "MatchAnywhere") // Play nice with memory SRP_List("Release", Handle) |