|
-
Apr 8th, 2005, 05:59 PM
#1
Thread Starter
Frenzied Member
whitespace
Hi
What is the correct method for finding spaces in a text string??
Is it if(str[i] == NULL), if(str[i] == "") or if(str[i] == '')??
-
Apr 8th, 2005, 06:11 PM
#2
Not NoteMe
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
-
Apr 8th, 2005, 06:52 PM
#3
Re: whitespace
Are you sure you want to use C?
Code:
std::string str;
std::string::size_type pos = str.find(' ');
-
Apr 8th, 2005, 07:01 PM
#4
Re: whitespace
You can also use the isspace() function, which will check for tabs as well as spaces.
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|