import java.text.DecimalFormat;
import java.text.Normalizer;
public class Main {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < str.length(); ++i) {
sb.append('\\');
sb.append('u');
for (int j = 4 - hex.length(); j-- > 0;) {
sb.append('0');
}
sb.append(hex);
}
}
private static void normalize
(final String str
) { System.
out.
println("From\t" + str
+ '\t' + toCodes
(str
)); for (Normalizer.Form form: Normalizer.Form.values()) {
String normalized
= Normalizer.
normalize(str, form
); form + "\t" + normalized + '\t' + toCodes(normalized));
}
}
public static void main
(final String[] args
) { format.setMaximumFractionDigits(20);
System.
out.
println(format.
format(1234567890123456L
)); System.
out.
println(format.
format(1234567890123456d
)); System.
out.
println(format.
format(1234567890123.456d
)); System.
out.
println(format.
format(1234567890.123456d
));
normalize("\u00c1");
normalize("\u0041\u0301");
normalize("\ufb03");
normalize("ff");
normalize("й");
normalize("\u0438\u0306");
normalize("å");
}
}
aW1wb3J0IGphdmEudGV4dC5EZWNpbWFsRm9ybWF0OwppbXBvcnQgamF2YS50ZXh0Lk5vcm1hbGl6ZXI7CgpwdWJsaWMgY2xhc3MgTWFpbiB7CiAgICBwcml2YXRlIHN0YXRpYyBTdHJpbmcgdG9Db2RlcyhmaW5hbCBTdHJpbmcgc3RyKSB7CiAgICAgICAgU3RyaW5nQnVpbGRlciBzYiA9IG5ldyBTdHJpbmdCdWlsZGVyKCk7CiAgICAgICAgZm9yIChpbnQgaSA9IDA7IGkgPCBzdHIubGVuZ3RoKCk7ICsraSkgewogICAgICAgICAgICBzYi5hcHBlbmQoJ1xcJyk7CiAgICAgICAgICAgIHNiLmFwcGVuZCgndScpOwogICAgICAgICAgICBTdHJpbmcgaGV4ID0gSW50ZWdlci50b0hleFN0cmluZyhzdHIuY2hhckF0KGkpKTsKICAgICAgICAgICAgZm9yIChpbnQgaiA9IDQgLSBoZXgubGVuZ3RoKCk7IGotLSA+IDA7KSB7CiAgICAgICAgICAgICAgICBzYi5hcHBlbmQoJzAnKTsKICAgICAgICAgICAgfQogICAgICAg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