string.checkReverse() returns the last position of the string that contains a character that does not appear in string comparator
Parameters
- Comparator
- Start Index
Examples
pjs.define("c1", { type: 'char', length: 50 }); pjs.define("num", { type: 'packed decimal', length: 2, decimals: 0 }); c1 = 'My *dog* Spot.* @ * @ *'; num = c1.checkReverse(' *@'); return num; //14
pjs.define("c1", { type: 'char', length: 6, initValue: '$2000.' }); pjs.define("num", { type: 'integer', length: 5, decimals: 0 }); num = c1.checkReverse('0123456789', 5); return num; //1
RPG Equivalent
%CHECKR()