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

The String.setLength() API allows you to set a length on a fixed length or a varying character string.

Parameters
  1. String
  2. Length
Return Value

String modified to the new length

 

Example

 

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