string.trim()



Removes characters (spaces by default) from both sides of a string.

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

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