string.rtrim()



Removes characters (spaces by default) from the right side of a string.

Parameters
  1. Character or string value to trim (optional)

Examples
Example 1: Trim trailing spaces
pjs.define("s", { type: 'char', length: 10, initValue: ' abc ' }); s = s.rtrim(); return s; // " abc"
Example 2: Trim trailing slashes
pjs.define("s", { type: 'char', length: 10, initValue: ' abc //' }); s = s.rtrim('/'); return s; // " abc "