Module containing sprintf like formatting functions.
- Source:
Methods
(inner) FORMAT(fmt) → {function}
- Source:
- See:
-
- sprintf
Generates formatting functions from sprintf-style format strings. This is generally faster when the same format string is used many times.
Example
var f = FORMAT("%.2f Hz");
Parameters:
Name | Type | Description |
---|---|---|
fmt |
string | The format string. |
Returns:
A formatting function.
- Type
- function
(inner) sprintf(fmt, …args) → {function}
- Source:
- See:
-
- FORMAT
Formats the arguments according to a given format string.
Example
sprintf("%d Hz", 440);
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
fmt |
string | The format string. |
|
args |
* |
<repeatable> |
The format arguments. |
Returns:
A formatting function.
- Type
- function