Task[edit]
Find the index of a string (needle) in an indexable, ordered collection of strings (haystack).

Raise an exception if the needle is missing.

If there is more than one occurrence then return the smallest index to the needle.

Extra credit
Return the largest index to a needle that has multiple occurrences in the haystack.

See also
 Search a list of records

haystack := ["Zig","Zag","Wally","Ronald","Bush","Krusty","Charlie","Bush","Bozo"]:
occurences := ListTools:-SearchAll(needle,haystack):
try
	#first occurence
	printf("The first occurence is at index %d\n", occurences[1]);
	#last occurence, note that StringTools:-SearchAll()retuns a list of all occurences positions
	printf("The last occurence is at index %d\n", occurences[-1]);
catch :
	print("Erros: Needle not found in the haystack"):
end try: