shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
sprintf
Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.string
Javascript implementation of the sprintf php function. >For more infos, check this github repository
Params
- format*-String
The format of the string wanted as output
- …replacements*-Mixed
The replacement tokens to apply to the string
Return
- -String
The processed string
Example
import { sprintf } from '@blackbyte/sugar/string'
sprintf('Hello %s', 'world') // Hello World
const user = { name: 'Dolly' }
sprintf('Hello %(name)s', user) // Hello DollyTodo
- testsnormal
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space