shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
printf
Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.string
printf php equavalent
Params
- source*-String
The source in which to replace the tokens
- values…*-Mixed
Any number of arguments to replace the placeholders in the string
Return
- -String
The resulting string
Example
import { printf } from '@blackbyte/sugar/string';
printf('Hello %s', 'world'); // => Hello world
printf('Hello %s, I\'m %s', 'world', 'John Doe'); // Hello world, I'm John Doe
printf('Hello %(first)s, I\'m %(name)s', { first : 'world', name : 'John Doe'}); // Hello world, I'm John DoeTodo
- testsnormal
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space