string.scan()
Returns the first position of a search argument in the source string, or 0 if it was not found. The first character in the string is considered position 1.
Parameters
Value to look for
Index to start from (optional) - the first character in the string is considered index 1; if omitted, search start from the beginning of the string
Length to search for (optional) - if omitted, the entire string is searched
Example
pjs.define("source", { type: 'char', length: 15, initValue: 'Dr. Doolittle' });
pjs.define("pos", { type: 'unsigned integer', length: 5, decimals: 0 });
pos = source.scan('oo');
return pos;
// 6
RPG Equivalent
%SCAN()
, multiple selections available, Use left or right arrow keys to navigate selected items