how to convert string into it's "html" ascii code using Java? -
e.g.
B uppercase b. if have string "boy". want converted BOY
i'm hoping there's library can use. i've searched net didn't see it.
thanks
you try writing own utility:
string input = "boy"; char[] chars = input.tochararray(); stringbuilder output = new stringbuilder(); (char c : chars) { output.append("&#").append((int) c).append(";"); }
output content after execution:
BOY
Comments
Post a Comment