Word Functions
DELWORD(string,n[,length])
delete substring of string starting at the nth
word and of length length words.
delword('one day in the year',3) /* 'one day' */
delword('one day in the year',3,2) /* 'one day year' */
FIND(string,phrase)
returns the word number of the first word of phrase
in string. Returns "0" if phrase is not found
find('one day in the year','in the') /* 3 */
JUSTIFY(string,length[,pad])
justify string to both margins (the width of margins
equals length), by adding pads between words.
justify('one day in the year',22) /*'one day in the year'
SUBWORD(string,n[,length])
return the substring of string that begins at the nth
word and is of length length words.
subword('one day in the year',2,2) /* 'day in' */
SPACE(string(,(n)(,pad)))
formats the blank-delimited words in string with n pad
characters between each word.
space(''one day in the year',2) /*'one day in the year' */
WORDS(string)
return the number of words in string
words('One day in the year') /* 5 */
WORD(string,n)
return the nth word in string
word('one day in the year',2) /* 'day' */
WORDINDEX(string,n)
return the position of the nth word in string
wordindex('one day in the year',2) /* 5 */
WORDLENGTH(string,i)
return the length of the nth word in string
wordlength('one day in the year',2) /* 3 */
WORDPOS(phrase,string[,start])
returns the word number of the first word of phrase
in string. Returns "0" if phrase is not found
wordpos('day in','one day in the year') /* 2 */