Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Returns the first position of a search argument from the end of source string, or 0 if it was not found. The first character in the string is considered position 1.

Parameters
  1. Value to look for
  2. Index to start from (optional) - if omitted, search starts from the end of the string; index 1 is considered the first character in the string
  3. Length to search (optional) - if omitted, the rest of the 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.scanReverse('l');
 
return pos;
// 12

 

 

  • No labels