string.setWordChar

Syntax string.setWordChar (character)

Params character is a single character enclosed in single or double quotation marks.

Action Redefines the character to be used as the delimiter between words to be character.

Returns True if the operation is successful; an error if the redefinition is illegal.

Examples ch = string.getWordChar ();
string.setWordChar ('.');
word = string.firstWord ("people.DW.notepad");
string.setWordChar (ch);
word

   » people

Errors Attempting to assign a multi-character string as character results in an error because Frontier cannot coerce a multiple-character string to be a character.

Notes This verb is used most often to set the word delimiter's value temporarily. It is generally used in conjunction with string.getWordChar so that the original value for the word separator can be saved and then restored when the temporary operation is

complete.

Setting wordChar affects the following verbs: string.countWords, string.firstWord, string.lastWord, string.nthWord.

See Also string.countWords

string.firstWord

string.getWordChar

string.lastWord

string.nthWord

Discuss