|
-
Feb 20th, 2003, 05:58 PM
#1
Thread Starter
Addicted Member
strstr() with a string
O.K. how do you use the strstr function I just can not figure it out
or is there something else i can do
i am reading from a file line by line and sticking it in a string each time i read in a new line i want to be able to search through it for a particular string....for example:
string Str2BeRead;
string searcher = "whatever i want";
say a string is read in and put into the Str2BeRead string. How would i search it for the searcher string? thanks!
-
Feb 20th, 2003, 08:47 PM
#2
Monday Morning Lunatic
Code:
Str2BeRead.find(params);
See the docs on std::string::find() for more details
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
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
|