Задать вопрос

Тел: +7 965 3737 888

450

Просмотров

1

Ответов

Python-like string interpolation in Javascript

<p>Provides python-like string interpolation.
It supports value interpolation either by keys of a dictionary or
by index of an array.</p>
<p>Examples:</p>
 interpolate("Hello %s.", ["World"]) == "Hello World."
 interpolate("Hello %(name)s.", {name: "World"}) == "Hello World."
 interpolate("Hello %%.", {name: "World"}) == "Hello %."

<p>This version doesn't do any type checks and doesn't provide
formating support.</p>

Вопрос полезен? Да0/Нет0
file_5158.js(687.0б)
None

Ответы (1):

Ответbrokenseal:21.06.2010
Ответ полезен? Да0/Нет0

Isn't this supposed to be a Django snippets site?