string.getWordChar

Syntax string.getWordChar ()

Params None

Action Determines what character is presently being used in Frontier as the word separator.

Returns The character currently being used to define word boundaries.

Examples string.getWordChar ()

   » ' '

This example assumes the wordChar has not been changed from its default value of space.

ch = string.getWordChar (); // save the wordChar
string.setWordChar ('.'); // temporarily change it to a period
word = string.firstWord ("people.DW.notepad");
string.setWordChar (ch); // restore the wordChar
msg (word)

   » true

Returns true because the last verb is msg, which executes successfully. Note that the message displayed is "people" because that's the value assigned to word by the execution of the string.firstWord verb.

Notes This verb is most useful when you wish to change the word separator temporarily. You can use string.getWordChar to assign the present separator to a variable. You can then use string.setWordChar to change the word separator temporarily and then restore it

later. (See the second example set above.)

See Also string.firstWord

string.lastWord

string.setWordChar

Discuss