< prev index next >

src/java.base/share/classes/sun/text/normalizer/Utility.java

Print this page

        

*** 225,245 **** return c; } /** * Convert a integer to size width hex uppercase digits. ! * E.g., hex('a', 4, str) => "0041". * Append the output to the given StringBuffer. * If width is too small to fit, nothing will be appended to output. */ public static StringBuffer hex(int ch, int width, StringBuffer output) { return appendNumber(output, ch, 16, width); } /** * Convert a integer to size width (minimum) hex uppercase digits. ! * E.g., hex('a', 4, str) => "0041". If the integer requires more * than width digits, more will be used. */ public static String hex(int ch, int width) { StringBuffer buf = new StringBuffer(); return appendNumber(buf, ch, 16, width).toString(); --- 225,245 ---- return c; } /** * Convert a integer to size width hex uppercase digits. ! * E.g., {@code hex('a', 4, str) => "0041"}. * Append the output to the given StringBuffer. * If width is too small to fit, nothing will be appended to output. */ public static StringBuffer hex(int ch, int width, StringBuffer output) { return appendNumber(output, ch, 16, width); } /** * Convert a integer to size width (minimum) hex uppercase digits. ! * E.g., {@code hex('a', 4, str) => "0041"}. If the integer requires more * than width digits, more will be used. */ public static String hex(int ch, int width) { StringBuffer buf = new StringBuffer(); return appendNumber(buf, ch, 16, width).toString();
*** 332,343 **** public static boolean isUnprintable(int c) { return !(c >= 0x20 && c <= 0x7E); } /** ! * Escape unprintable characters using <backslash>uxxxx notation ! * for U+0000 to U+FFFF and <backslash>Uxxxxxxxx for U+10000 and * above. If the character is printable ASCII, then do nothing * and return FALSE. Otherwise, append the escaped notation and * return TRUE. */ public static boolean escapeUnprintable(StringBuffer result, int c) { --- 332,343 ---- public static boolean isUnprintable(int c) { return !(c >= 0x20 && c <= 0x7E); } /** ! * Escape unprintable characters using {@code <backslash>uxxxx} notation ! * for U+0000 to U+FFFF and {@code <backslash>Uxxxxxxxx} for U+10000 and * above. If the character is printable ASCII, then do nothing * and return FALSE. Otherwise, append the escaped notation and * return TRUE. */ public static boolean escapeUnprintable(StringBuffer result, int c) {
< prev index next >