alexei / sprintf.js

sprintf.js is a complete open source JavaScript sprintf implementation
BSD 3-Clause "New" or "Revised" License
2.11k stars 290 forks source link

provide padding examples #202

Closed enuggetry closed 3 years ago

enuggetry commented 3 years ago

it would be great if you provided some padding examples with output results, as it's not entirely clear how it works.

alexei commented 3 years ago

Yeah, the readme assumes the user is familiar with the basics of (s)printf, perhaps wrongly. In the meantime, you can take a look over the examples in the test case. See also PHP's sprintf docs, as this library initially followed PHP's spec which is slightly different than that of C/C++.