Im currently working on something and fell on a stump and cant seem to get out of it.
What im trying to do is Find text and after the text get the next word lenght like this.
It gets the text ":!test" from the string(irc text)
But it could be like "!test Rocket" or anything of course
Another Thing is I want to send the found items into one String not multiable times dont tell me how to do this one just want a hint on how to go about doing it
1 2 3 4 5 6 7 8 9 10 11 12 13
string Text;//Irc Text
string Found;
if (!(Text.find(":!test ") == std::string::npos)){
int A = Text.find(":!test ") + 7;
Found = Text.substr (A,NotSureWhatGoesHere);
for(int i = 0; i < Lines; i++){//Lines is how many current lines are in the file im reading into the TextArray
std::string Search = TextArray[i];
int B = Search.find(Found .c_str());
if(B >= 0) {
SendToIrc(TextArray[i])//Needs Fixing
}
}
}
Turbined tested that method and still does nothing :(
and at Zhuge is that i dont know how many characters to read since the text is different each time