![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e79. Converting Between Unicode and UTF-8try { // Convert from Unicode to UTF-8 String string = "abc\u5639\u563b"; byte[] utf8 = string.getBytes("UTF-8"); // Convert from UTF-8 to Unicode string = new String(utf8, "UTF-8"); } catch (UnsupportedEncodingException e) { }
e71. Comparing Strings e72. Determining If a String Contains a Substring e73. Getting a Substring from a String e74. Searching a String for a Character or a Substring e75. Replacing Characters in a String e76. Replacing Substrings in a String e77. Converting a String to Upper or Lower Case e78. Converting a Primitive Type Value to a String e80. Determining a Character's Unicode Block e81. Determining If a String Is a Legal Java Identifier
© 2002 Addison-Wesley. |