Java Terminal Color Output colorString(String string)

Here you can find the source of colorString(String string)

Description

color String

License

Open Source License

Declaration

public static String colorString(String string) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String colorString(String string) {
        return colorString(string, '&');
    }/*from   www . j  a va 2  s .c  o  m*/

    public static String colorString(String string, char c) {
        if (string == null) {
            throw new IllegalArgumentException("String cannot be null");
        }
        return string.replace(c, '\u00A7').replace("\u00A7\u00A7", String.valueOf(c));
    }
}

Related

  1. colorizeText(String str, String color)
  2. colorizeText(String str, String color)
  3. colorizeText(String str, String fgc, String bgc)
  4. colors(String string)
  5. colorString(String input)
  6. colorText(final int color)
  7. colorText(int v, int vlo, int vhi, int rlo, int glo, int blo, int rhi, int ghi, int bhi)