string

Syntax

sr = string(a<,i1><,s1><,i2><,s2>)

Create a string. The optional parameters are used to define the string width and fill. The last two optional parameters (only applicable if a is composed of numbers) are the precision and format.

Returns:

sr - string

Arguments:

a - string value that can be of the following types:

  • Boolean that returns true or false
  • float
  • index
  • integer
  • pointer, where the string takes the value of the pointer ID
  • vector

i1 - optional string width, or number of characters in the string

s1 - optional string width, padded with s1 to the desired width i1

i2 - optional precision if a is composed of numbers

s2 - optional format with the following admissible values:

  • e with format as [-]9.9e[+|-]999
  • E with format as [-]9.9E[+|-]999
  • f with format as [-]9.9
  • F with format as [-]9.9
  • g that uses e or f format, whichever is the most concise
  • G that uses E or f format, whichever is the most concise