Product Documentation
Virtuoso ADE SKILL Reference
Product Version IC23.1, November 2023

cdfFormatFloatString

cdfFormatFloatString(
t_string
t_scaleFactor
)
=> nil / t_val 

Description

This function formats the input string into a value representation, if possible. It formats the input string using the input scale factor, re-converts the value to a string, and then returns the formatted string value. If the input string cannot be converted, the input string is returned with no change to it.

Arguments

t_string

Specifies a string representing a float value

t_scaleFactor

Specifies a string representing a scale factor

Value Returned

nil

When the given t_scaleFactor is invalid

t_val

Specifies that the input string can be formatted using the input scale factor. Else, the input string is returned without any change to it.

Examples

cdfFormatFloatString("123.4" "m") => "123400.0m"
cdfFormatFloatString("10000" "M") => "0.01M"

Return to top
 ⠀
X