$Lstr_Words

From m204wiki
Revision as of 22:28, 8 February 2011 by Admin (talk | contribs) (1 revision)
Jump to navigation Jump to search

<section begin="desc" />Return the number of words in a long string<section end="desc" />

Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Lstr_Words function is to be entered.

This function takes a string or longstring input and returns a number indicating the word position of the second argument within the long string. If the word is not present, zero is returned.

The $Lstr_Words function accepts two arguments and returns a string result.

The first argument is an arbitrary string or longstring. This is a required argument.

The second argument is a string containing from 1 to 255 characters which are the delimiters for the longstring. This is an optional argument and defaults to a blank.

Syntax

<section begin="syntax" /> %RESULT = $Lstr_Words(longstring, delims) <section end="syntax" />

$Lstr_Words function

%RESULT is the count of words in the longstring.

For example, the following statement sets %RES to 8.:

%RES = $Lstr_Words('Picture yourself in a boat on a river')

This statement sets %RES to 7:

%RES = $Lstr_Words('Picture yourself in a boat on a river', 'a ')


For more information see :hdref refid=lstr..

$Lstr_Words is only available in Sirius Mods Version 6.5 and later.

Products authorizing $Lstr_Words