String.spaces()

String.spaces()

The String.spaces() API returns a string of spaces.

Parameters
  1. Number of spaces (optional) - if omitted, the number of spaces is determined by the definition of the field that the return value is being assigned to

Return Value

String of spaces with the length specified by the parameter

Example



var s = String.spaces(3); // s now contains " " (3 spaces)