Coffeekraken.io 0.0.1

printf

printf php equavalent

Name Type Description Status Default
source { String } The source in which to replace the tokens required
values { Object , Array , ... } An object/array/list of values to replace required

Return { String } The resulting string

Example

    printf('Hello %s', 'world'); // => Hello world
printf('Hello %s, I\'m %s', 'world', 'John Doe'); // Hello world, I'm John Doe
printf('Hello %s, I\'m %s', ['world', 'John Doe']); // Hello world, I'm John Doe
printf('Hello {first}, I\'m {name}', { first : 'world', name : 'John Doe'}); // Hello world, I'm John Doe

See more : https://monocleglobe.wordpress.com/2010/01/12/everybody-needs-a-little-printf-in-their-javascript/

Author : Olivier Bossel olivier.bossel@gmail.com