weird problem with println
hello, i have this weird problem, i built a method to replace all non letter charecters with blank space, when i put small string it works perfectly, but when i put large string into it, it wont print the result (system.out.println), but when i place the method output into txt file, it writes it just fine . but later when i try println from the file it wont print either.
here's the method, maybe you can tell me what i'm doing wrong
Code:
public static String clearTokens(String text){
String lowerCase = text.toLowerCase();
StringBuilder buf = new StringBuilder( text );
for(int i = 0 ; i< lowerCase.length() ;i++ ){
if((lowerCase.charAt(i)< 'a') || ( lowerCase.charAt(i)>'z' )){
buf.setCharAt(i,' ');
}
}
return buf.toString();
}
i need this method to clear special chars from downloaded url.
the input is about 50000 chars
thank you for any help...