STR()
Description
Return the text equivalent of a numeric expression by evaluating a pattern string, the value, and the locale information. The pattern or format string controls various features, such as if a currency symbol, percent symbol, or thousands separator is displayed, and how many digits are shown on either side of the decimal symbol. Valid pattern symbols include:
"9" – displays digits if they are present
"0" – displays a 0 as a placeholder if no digit was present for that position
"*" – fill unused digits with the asterisk symbol (only valid on the left side of the decimal point) – typically used for check writing systems
"-" – allow room for the sign character
"+" – allow room for the sign character and display even positive values with a leading +
"$" – displays the currency symbol as defined in the locale information directly before or after the value (depends on locale information)
" $" – displays the currency symbol as defined in the locale information separated by a space before or after the value (depends on locale information)
"%" – displays the percent symbol after the value
"(" – shows negative values in parentheses
"z" – shows zero values as blank spaces
"." – represents the decimal point when in combination with digit characters, when used alone it means to use as much space as required for the value, and no more
"," – formats using the defined thousands separator character (every three), as defined in the locale information
Prototype
STR
(
number
,
string value
,
SBLNumSettings pattern
)
s
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
value | None | number | |
pattern | None | string | |
s | None | SBLNumSettings |