longjt
asked on
Convert horizontal tab (	) into a space( )
How would Achieve this? I thought I might use a replace statement but it's not playing nice with the 	.
static String replaceWord(String original, String find, String replacement) {
int i = original.indexOf(find);
if (i < 0) {
return original; // return original if 'find' is not in it.
}
String partBefore = original.substring(0, i);
String partAfter = original.substring(i + find.length());
return partBefore + replacement + partAfter;
}
int i = original.indexOf(find);
if (i < 0) {
return original; // return original if 'find' is not in it.
}
String partBefore = original.substring(0, i);
String partAfter = original.substring(i + find.length());
return partBefore + replacement + partAfter;
}
>>I thought I might use a replace statement but it's not playing nice with the 	
Should work. What is the probem you ate facing??
Should work. What is the probem you ate facing??
ASKER
Actually I gooffed. This is an asp question. Gata love programming in multiple languages.
the error is
Expected end of statement
this is on line:
strLine3 = Replace(strLine3), "	", " "
the error is
Expected end of statement
this is on line:
strLine3 = Replace(strLine3), "	", " "
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
or ???
strLine3 = Replace strLine3, "	", " "
strLine3 = Replace strLine3, "	", " "
/*
* Created on Aug 12, 2004
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
/**
* @author Sudhakar
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class Test1 {
public static void main(String s[])
{
System.err.println("	"
}
}