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 3 Next »

The String.setLength() API allows you set a length of a string to a certain length.

Parameters
  1. String
  2. Length

Return Value

String with length that was passed

 

Example

 

pjs.define("source", { type: 'char', length: 15, initValue: 'Dr. Doolittle' });
 
source = String.setLength(source, 2);
 
return source;
//Dr
  • No labels