string.build
Syntax
- sr = string.build(s<,a1><,a2>...)
Build a string using token replacement. The string s is used as the base. The tokens %1, %2, %3 etc. are used to indicate the locations that subsequent parameters a1, a2, etc. will be place. The following parameters will be automatically converted to strings, if necessary. If this is not possible, an error will occur.
Returns: sr - concatenated string Arguments: s - strings to concatenate
Usage Example
The following example illustrates how string.build
can be used, the result will be the string v1 = 12, v2 = 3.456.
local v1 = 12
local v2 = 3.456
local a = string.build("v1 = %1, v2 = %2.",v1,v2)
io.out(a)
Was this helpful? ... | PFC 6.0 © 2019, Itasca | Updated: Nov 19, 2021 |