Bookshelf Home | Contents | Index | PDF |
Siebel eScript Language Reference > Siebel eScript Commands > The Clib Object String Methods > Clib.sprintf() MethodThis method writes output to a string variable according to a prescribed format. SyntaxClib.sprintf(stringVar, formatString, var1, var2, ..., varn) ReturnsThe number of characters written into buffer if successful; otherwise, EOF. UsageThis method formats the values in the variables according to formatString and assigns the result to stringVar. The formatString contains character combinations indicating how following parameters are to be treated. For information on format strings used with Clib.sprintf(), see Table 3 in the section Clib.asctime() Method. The string value need not be previously defined; it is created large enough to hold the result. Characters are printed as read to standard output until a percent character (%) is reached. The percent character indicates that a value is to be printed from the parameters following the format string. ExampleEach of the following lines shows an sprintf example followed by the resulting string: var testString; See Also |
Siebel eScript Language Reference |