From: <[EMAIL PROTECTED]>
> + protected String stripLineBreaks(String source) {
> + //Linebreaks. What do to on funny IBM mainframes with odd line
endings?
> + String linebreaks="\r\n";
Why are you not using System.getProperty("line.separator")
instead? Or do you want \r stripped no matter
what platform the file is under?
> + int len=source.length();
> +
> + StringBuffer dest=new StringBuffer(len);
> + for(int i=0;i<len;++i) {
> + char ch=source.charAt(i);
> + if(linebreaks.indexOf(ch)==-1) {
> + dest.append(ch);
> + }
> + }
> + return new String(dest);
> +
> }
Cheers,
Magesh
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>