Simple.String.Format

node v10.24.1
version: 1.0.0
endpointsharetweet
require("simple.string.format") let helloWorld = "Hello, {0}!".format("World"); let example1 = "Hello, {0}! this is example # {1}.".format("World", 1); let example2 = "{0} + {0} = 2".format(1, 2); let example3 = "{{0}} will be replaced with {0}".format("hi"); console.log(helloWorld); console.log(example1); console.log(example2); console.log(example3);
Loading…

no comments

    sign in to comment