wwUtils::FormatString

Uses the .NET string.Format() function to format text strings using .NET based string formatting logic. This provides sophisticated string embedding similar to TextMerge without the overhead of textmerge.

o.FormatString(lcFormat,lvVal1...lvVal10)

Parameters

lcFormat
A format string that contains up to 10 parameters formatted with {0} to {10} that are replaced with the corresponding parameter values. The bracketed expressions can use .NET formatting appropriate for the type of the value displayed. So, {0:n4} applies n4 (number format with 4 decimals) to the number.

For more info on .NET format strings please see FormatValue()

lvVal1...lvVal10
The values to display. Displays with ToString() or with the format string if provided in tie {0:c4} syntax.

Remarks

Uses .NET and wwDotnetBridge under the covers so make sure wwDotnetBridge and .NET 4.0 are available on the target machine.

Example

? formatstring("Give me a number {0:c4} and a string {1} and a date {2:MMM dd, yyyy}",;
               1.1,"Rick",DATETIME())
* Give me a number $1.0000 and a string Rick and a date May 02, 2016

See also:

Class wwUtils | wwUtils::FormatValue

© West Wind Technologies, 1996-2018 • Updated: 05/02/16
Comment or report problem with topic