public static String removeFormatting(String line){
  int length=line.length();
  StringBuilder buffer=new StringBuilder();
  for (int i=0; i < length; i++) {
    char ch=line.charAt(i);
    if (ch != '\u000f' && ch != '\u0002' && ch != '\u001f' && ch != '\u0016')     buffer.append(ch);
  }
  return buffer.toString();
}

public static String removeFormatting ( String line ) { int length = line . length ( ) ; StringBuilder buffer = new StringBuilder ( ) ; for ( int i = 0 ; i < length ; i ++ ) { char ch = line . charAt ( i ) ; if ( ch != '' && ch != '' && ch != '' && ch != '' ) buffer . append ( ch ) ; } return buffer . toString ( ) ; }
remove formatting from a line of irc text .
