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

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -