Siebel eScript Language Reference > Siebel eScript Commands > Clib Object String Methods >
Clib.rsprintf() Method
This method returns a formatted string. Syntax
Clib.rsprintf([formatString] [,var1, var2, ..., varn])
|
|
formatString |
A string indicating how variable or literal parameters are to be treated |
var1, var2, ..., varn |
Variables to be printed using the formatString |
Returns
A string formatted according to formatString. Usage
Clib.rsprintf() can return string or numeric literals that appear as parameters. The format string contains character combinations indicating how following parameters are to be treated. For information on format strings used with Clib.rsprintf(), see Table 34 in the section Clib.asctime() Method. If there are variable parameters, the number of formatting sequences must match the number of variables. Characters are returned as read until a percent character (%) is reached. The percent character indicates that a value is to be printed from the parameters following the format string. Example
Each of the following lines shows an rsprintf example followed by the resulting string: var TempStr = Clib.rsprintf("I count: %d %d %d.",1,2,3) //"I count: 1 2 3" var a = 1; var b = 2; TempStr = Clib.rsprintf("%d %d %d",a, b, a+b) //"1 2 3"
See Also
Clib.sprintf() Method
|