android - String.Format (.NET) equivalent in Java? -
the string.format in .net (maybe vb.net) convert {0}, {1}, ... determined string, example:
dim st string = "test: {0}, {1}" console.writeline(string.format(st, "text1", "text2"))
i've tried search in both google , stackoverflows, return number-string format.
the other suggestions good, more in style of printf
, lineage more recent additions java. code posted looks inspired messageformat
.
string format = "test: {0}, {1}" system.out.println(messageformat.format(format, "text1", "text2"))
i'm not 'return:
statement doing though.
Comments
Post a Comment