This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Is tab a character? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Is tab a character?" Watch "Is tab a character?" New topic
Author

Is tab a character?

Cameron Park
Ranch Hand

Joined: Apr 06, 2001
Posts: 371
Hi I am confounded by a String problem. I have this parser that is supposed to skip either spaces or null characters, but I got this one mysterious token that returns false for comparison with both null and space! And when I tried to println that token, it's blank. So, that left me to wonder if tab is considered a character that can be compared.
Please help.
Cameron Park
Ranch Hand

Joined: Apr 06, 2001
Posts: 371
Yeah, tab is a character. Lacking oxygen is a terrible thing.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Yup, its the character '\t'
[This message has been edited by David O'Meara (edited May 08, 2001).]
Art Metzer
Ranch Hand

Joined: Oct 31, 2000
Posts: 241
Hi, Cameron.
Are you sure you're using the "equals" comparator for the space?
If "candidate" is a String, then...

Art
 
 
subject: Is tab a character?
 
Similar Threads
Reading strings from file
StringTokenizer cannot split String with tabs?
Removing tab character(^I) and null character Unicode: 0x0 from configuration XML file.
request.setAttribute in firefox
need help