sprintf("format",...)

Following the C language style, returns a string after formatting the parameters. The format string can process the e, f, s, i and d format characters only.


See also printf print println 


Example


s = sprintf("My name is %10s and I'm %d years old", "John", 25 )

"My name is       John and I'm 25 years old"