A set of tools to manipulate text, i.e. making text from templates in C#/Python way is faster than fmt.Sprintf
stringFormatter
now supports arg formatting and it FASTER then fmt
, formatting looks as follows:
{0:B}, 15 outputs -> 1111
{0:B8}, 15 outputs -> 00001111
{0:X}, 250 outputs -> fa
{0:X4}, 250 outputs -> 00fa
{0:o}, 11 outputs -> 14
{0:E2}, 191.0478 outputs -> 1.91e+02
{0:F}, 10.4567890 outputs -> 10.456789
{0:F4}, 10.4567890 outputs -> 10.4568
{0:F8}, 10.4567890 outputs -> 10.45678900
{0:P100}, 12 outputs -> 12%
StringFormatter was refactored and simplified (#13)
Proper handle of double curly brackets (having both cases in tests when {{0}} converts to {0} and when we deal with complicated json)
Forgot to fix bug (#10 ) for FormatComplex
in 1.0.3
, fixed there
Fixed issue with nested curly brackets inside text
Better performance than in 1.0.1
Key features:
Format
and FormatComplex
functions Performance became better than performance of fmt.Sprintf
Key features:
Format
and FormatComplex
functions Performance became better than fmt.Sprintf
WRONG MODULE NAME, use v1.0.1
Created go.mod file