...
The sprintf()
operator can be applied to either a number or a string. The operator takes a formatting string as its sole argument. Use \%s
to escape a literal %s
and \\ to escape a literal \
:
Code Block | ||||
---|---|---|---|---|
| ||||
a = "Hello world!" b = a.sprintf("<%s \%s>") // b = "<Hello world! %s>" |
...