Java Java String Format toJavaHexCharString(final char chr)

Here you can find the source of toJavaHexCharString(final char chr)

Description

to Java Hex Char String

License

Open Source License

Declaration

private static String toJavaHexCharString(final char chr) 

Method Source Code

//package com.java2s;

public class Main {
    private static String toJavaHexCharString(final char chr) {
        final String hexString = "0000" + Integer.toHexString(chr);
        return "\\u" + hexString.substring(hexString.length() - 4);
    }//from   ww  w .j av  a 2s .c  o m
}

Related

  1. toJavaClassName(String str)
  2. toJavaConstantIdentifier(String name)
  3. toJavadocComment(String comment)
  4. toJavaEnum(String inStr)
  5. toJavaHex(byte in[], int len)
  6. toJavaIdentifier(String name)
  7. toJavaIdentifier(String name)
  8. toJavaIdentifier(String nodeName, boolean boundary)
  9. toJavaIdentifier(String s)