This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ==== strfind ==== Searches a string for a substring === Description === <code>strfind( const string[], const sub[], bool:ignorecase=false, index=0 )</code> Search the haystack ''string'' for a needle ''sub''. Optionally ignore case and start at an offset in the haystack. === Parameters === | ''string'' | String to be searched (the haystack) | | ''sub'' | The string we're looking for (the needle) | | ''ignorecase'' (optional) | If set to true, the search will ignore case | | ''index'' (optional) | Start at an offset different than the start of the haystack string | === Return value === Returns the offset of ''sub'' in ''string'' if successful.\\ Returns -1 if no occurrence of ''sub'' was found in ''string''. The returned offset is always relative to the start of the ''string'', even if a search offset is given. === Example usage === <code javascript> new x; new s{20} = "CatDogAnt"; x = strfind(s, "Dog"); // x is now 3 </code> ezeio2/scriptref/strfind.txt Last modified: 2019-09-02 21:43by andreh Log In