1.11M Members

Skip space characters

 
0
 

hi
can anybody tell me how ti skip blank spaces in java.Is there any function for that.Or we have to write code for that.

thanks

 
0
 

You have to write code for everything in Java - that's pretty much the point. What you write really depends on what you are trying to do, which you failed to adequately explain. What do you want to "skip blank spaces" in? What are you wanting to do with the "not blank spaces" remainder?

 
0
 

Look into Character.isSpaceChar(char ch)

 
0
 

Or split(), regex, indexOf(), trim()... all of those could be useful, depending on the intent.

 
0
 

even using indexOf(" "); propably could help you out.
but what do you mean with "skip" read over them, erase them out of the String, ... ?

 
0
 

Next time use another title. The rule says titles such as 'help me' and the like are not encouraged.

 
0
 

Good idea; edited.

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article