1,105,625 Community Members

Skip space characters

Member Avatar
laki234
Newbie Poster
10 posts since Nov 2008
Reputation Points: -3 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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

Member Avatar
Ezzaral
Posting Sage
7,431 posts since May 2007
Reputation Points: 2,714 [?]
Q&As Helped to Solve: 953 [?]
Skill Endorsements: 31 [?]
Moderator
Featured
 
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?

Member Avatar
~s.o.s~
Failure as a human
10,399 posts since Jun 2006
Reputation Points: 2,496 [?]
Q&As Helped to Solve: 992 [?]
Skill Endorsements: 72 [?]
Administrator
Featured
 
0
 

Look into Character.isSpaceChar(char ch)

Member Avatar
Ezzaral
Posting Sage
7,431 posts since May 2007
Reputation Points: 2,714 [?]
Q&As Helped to Solve: 953 [?]
Skill Endorsements: 31 [?]
Moderator
Featured
 
0
 

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

Member Avatar
stultuske
Posting Expert
5,332 posts since Jan 2007
Reputation Points: 938 [?]
Q&As Helped to Solve: 776 [?]
Skill Endorsements: 35 [?]
Featured
 
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, ... ?

Member Avatar
Obeledeveloper
Light Poster
44 posts since Aug 2008
Reputation Points: -3 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Member Avatar
~s.o.s~
Failure as a human
10,399 posts since Jun 2006
Reputation Points: 2,496 [?]
Q&As Helped to Solve: 992 [?]
Skill Endorsements: 72 [?]
Administrator
Featured
 
0
 

Good idea; edited.

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