A
alejandrina
Hi all,
I want to pass a tab character as a command line parameter. Ihave this
statement to extract a char from the string:
char delim = args[0].charAt(0);
The problem is how do you write the command line? I've tried all of
these:
java testTab "\t"
java testTab "\\t"
java testTab \t
java testTab \\t
java testTab "\u0009"
java testTab \u0009
none work. "delim" above never gets the right character. Interestingly,
when I submit
java testTab "\u0009" or
java testTab "\\t"
args[0] contains a string of length = 2, the first character being "\"
and the second is the tab. Obviously, the parser feels the need to
"escape" my backslash character. How do you disable this behavior?
Thanks!
Alejandrina
I want to pass a tab character as a command line parameter. Ihave this
statement to extract a char from the string:
char delim = args[0].charAt(0);
The problem is how do you write the command line? I've tried all of
these:
java testTab "\t"
java testTab "\\t"
java testTab \t
java testTab \\t
java testTab "\u0009"
java testTab \u0009
none work. "delim" above never gets the right character. Interestingly,
when I submit
java testTab "\u0009" or
java testTab "\\t"
args[0] contains a string of length = 2, the first character being "\"
and the second is the tab. Obviously, the parser feels the need to
"escape" my backslash character. How do you disable this behavior?
Thanks!
Alejandrina