1 Attachment(s)
Re: "\b" not "back spacing"?
the character its out printing is Attachment 921 for some reason it didnt post it.
Re: "\b" not "back spacing"?
What happens when you have control characters being displayed by a program is up to the program.
Each program can do its own thing when it reads and displays a control character.
Re: "\b" not "back spacing"?
so how would I make it read \b and know to remove one character back?
Re: "\b" not "back spacing"?
Quote:
how would I make it read \b
What is the "it"?
You could write a method that takes a String as input, scans for the \b character and does some substrings to create a new String with the \b and the character removed.
Re: "\b" not "back spacing"?
You could override printwriter and then set the System.out, although it seems like a lot of effort for not very much gain.
EG:
Code java:
import java.io.PrintWriter;
public class PrintWriter2 extends PrintWriter
{
public PrintWriter2(OutputStream out)
{
super(out);
}
@Override
public void print(String mes)
{
//Modify the message however you like
super.print(mes);
}
}
Then in the main method
Edit, Norm's method might be better.
Re: "\b" not "back spacing"?
alright i got it working thanks