Example usage for java.lang String format

List of usage examples for java.lang String format

Introduction

In this page you can find the example usage for java.lang String format.

Prototype

public static String format(String format, Object... args) 

Source Link

Document

Returns a formatted string using the specified format string and arguments.

Usage

From source file:Main.java

public static void main(String[] args) {
    for (char ch = Character.MIN_VALUE; ch < Character.MAX_VALUE; ch++) {
        if (Character.OTHER_NUMBER == Character.getType(ch)) {

            String s = String.format("\\u%04x", (int) ch);
            System.out.println(s);
        }/*from  w  w w .  j  a va 2 s . c  om*/
    }
}

From source file:Main.java

public static void main(String[] args) {
    for (char ch = Character.MIN_VALUE; ch < Character.MAX_VALUE; ch++) {
        if (Character.CURRENCY_SYMBOL == Character.getType(ch)) {
            String s = String.format("\\u%04x", (int) ch);
            System.out.println(s);
        }/*from w ww.  java 2s. c o m*/
    }
}

From source file:Main.java

public static void main(String[] args) {
    for (char ch = Character.MIN_VALUE; ch < Character.MAX_VALUE; ch++) {
        if (Character.DASH_PUNCTUATION == Character.getType(ch)) {
            String s = String.format("\\u%04x", (int) ch);
            System.out.println(s);
        }/*from   ww  w.j a v a 2  s .  c om*/
    }
}

From source file:Main.java

public static void main(String[] args) {
    for (char ch = Character.MIN_VALUE; ch < Character.MAX_VALUE; ch++) {
        if (Character.LETTER_NUMBER == Character.getType(ch)) {

            String s = String.format("\\u%04x", (int) ch);
            System.out.println(s);
        }// w  w  w  . j a v  a2  s  .c  om
    }
}

From source file:Main.java

public static void main(String[] args) {
    for (char ch = Character.MIN_VALUE; ch < Character.MAX_VALUE; ch++) {
        if (Character.FORMAT == Character.getDirectionality(ch)) {
            String s = String.format("\\u%04x", (int) ch);
            System.out.println(s);
        }/*w  w  w .j  av  a  2s. c o m*/
    }
}

From source file:Main.java

public static void main(String[] args) {
    for (char ch = Character.MIN_VALUE; ch < Character.MAX_VALUE; ch++) {
        if (Character.MAX_CODE_POINT == Character.getType(ch)) {

            String s = String.format("\\u%04x", (int) ch);
            System.out.println(s);
        }/*  ww  w  .  j ava  2  s. c  o  m*/
    }
}

From source file:Main.java

public static void main(String[] args) {
    for (char ch = Character.MIN_VALUE; ch < Character.MAX_VALUE; ch++) {
        if (Character.LINE_SEPARATOR == Character.getType(ch)) {

            String s = String.format("\\u%04x", (int) ch);
            System.out.println(s);
        }/*from w  w w.  j av  a  2  s . c o  m*/
    }
}

From source file:Main.java

public static void main(String[] args) {
    for (char ch = Character.MIN_VALUE; ch < Character.MAX_VALUE; ch++) {
        if (Character.SPACE_SEPARATOR == Character.getType(ch)) {

            String s = String.format("\\u%04x", (int) ch);
            System.out.println(s);
        }//from   ww  w. ja va2  s  .  c  o  m
    }
}

From source file:Main.java

public static void main(String[] args) {
    for (char ch = Character.MIN_VALUE; ch < Character.MAX_VALUE; ch++) {
        if (Character.MODIFIER_SYMBOL == Character.getType(ch)) {

            String s = String.format("\\u%04x", (int) ch);
            System.out.println(s);
        }//from   w w  w  . j  av  a 2  s .  c  om
    }
}

From source file:Main.java

public static void main(String[] args) {
    for (char ch = Character.MIN_VALUE; ch < Character.MAX_VALUE; ch++) {
        if (Character.NON_SPACING_MARK == Character.getType(ch)) {

            String s = String.format("\\u%04x", (int) ch);
            System.out.println(s);
        }/*  w  ww  .  j a v  a  2 s  .com*/
    }
}