954,545 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Skip space characters

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

laki234
Newbie Poster
10 posts since Nov 2008
Reputation Points: 7
Solved Threads: 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?

Ezzaral
Posting Genius
Moderator
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
 

Look into Character.isSpaceChar(char ch)

~s.o.s~
Failure as a human
Administrator
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
 

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

Ezzaral
Posting Genius
Moderator
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
 

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

stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
 

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

Obeledeveloper
Light Poster
46 posts since Aug 2008
Reputation Points: 7
Solved Threads: 0
 

Good idea; edited.

~s.o.s~
Failure as a human
Administrator
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You