Search a list: Difference between revisions
Content added Content deleted
(Ada solution added) |
m (Added to text proc cat) |
||
Line 1: | Line 1: | ||
{{task}} |
{{task|Text processing}} |
||
Find the index of a string (needle) in an array of strings (haystack), or else raise an exception if the needle is missing. |
Find the index of a string (needle) in an array of strings (haystack), or else raise an exception if the needle is missing. |
||
If there is more then one occurrence then return smallest i such that haystack[i] = needle. |
If there is more then one occurrence then return smallest i such that haystack[i] = needle. |