omron — POS real-valued function

POS real-valued function POS real-valued function Syntax POS (search_string, sub_string, start ) Function Return the starting character position of a substring in a string. Parameters search_string String expression to be searched for the occurrence of a substring. sub_string String expression containing the substring to be searched for within the search string. start Optional expression indicating the character position within the search string where searching is to begin. Details Returns the character position in search_string where sub_string begins. If the substring does not occur within the search string, a value of 0 is returned.

If start is provided, it indicates the character position within search_string where searching will begin. A value of 1 indicates the first character. If start is omitted or less than 1, searching begins with the first character. If start is greater than the length of search_ string , a value of 0 is returned. When checking for a matching substring, uppercase and lowercase letters are considered to be the same. Examples POS("file.ext", ".") ;Returns 5 POS("file", ".") ;Returns 0 POS("abcdefgh", "DE") ;Returns 4 POS("1-2-3-4", "-", 5) ;Returns 6 eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 403