Skip to content

tsingmuhe/StringFormat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StringFormat

For example,

StringFormat.format("Hi {}.", "there");

will return the string "Hi there.".

StringFormat.format("Set {1,2,3} is not equal to {}.", "1,2");

will return the string "Set {1,2,3} is not equal to 1,2.".

StringFormat.format("Set \\{} is not equal to {}.", "1,2");

will return the string "Set {} is not equal to 1,2.".

StringFormat.format("Hi {}.", new Object[]{new String[]{"1", "2", "3"}});

will return the string "Hi [1, 2, 3].".

reference:

org.slf4j.helpers.MessageFormatter

The formatting conventions are different than those of MessageFormat which ships with the Java platform. This is justified by the fact that SLF4J's implementation is 10 times faster than that of MessageFormat. This local performance difference is both measurable and significant in the larger context of the complete logging processing chain.

About

String Format Tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages