Methods
(generator) fibonacci() → {number}
- Source:
Generate numbers in the Fibonacci sequence.
Yields:
The next number in the Fibonacci sequence.
- Type
- number
module:strings/format(format, …args) → {string}
- Source:
Format a string quickly and easily using .net style format strings
Examples
var strings = require("papyrus/strings");
var s = strings.format("Hello {0}", "Madame Vastra");
// s = "Hello Madame Vastra"
{@lang xml}
<span>
<%= strings.format("Hello {0}", "Madame Vastra") %>
</span>
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
format |
string | A string format like "Hello {0}, now take off your {1}!" |
|
args |
? |
<repeatable> |
One argument per |
Returns:
- Type
- string