The Wordindex function returns the character position of the Nth word in a string. Words are separated by spaces.
result = Wordindex( string, n ) |
Examples:
say Wordindex( 'what is your favorite word?', 5 ) -- shows: 23 (the position of: word?) say Wordindex( 'what is your favorite word?', 6 ) -- shows: 0 say Wordindex( 'let us not quibble over a word or two', 4 ) -- shows: 12 (the position of: quibble) |