Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is tab a character?

 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, tab is a character. Lacking oxygen is a terrible thing.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup, its the character '\t'
[This message has been edited by David O'Meara (edited May 08, 2001).]
 
Art Metzer
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Cameron.
Are you sure you're using the "equals" comparator for the space?
If "candidate" is a String, then...

Art
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic