linux - How to remove unwanted content from string in c++? -


hi have string variable large content. have remove unwanted line string content , keep remaining content is. following output after printing string:

string varstring; cout<<"string content :"<<endl<<varstring<<endl;  output : string content : /abc/def/ghi/klm/run.so call::myfuncton(int const&) call::my::method(char const&) . . . call::my::newfunction(char *&) 

now have remove "call::myfuncton(int const&)" line above string variable , keep other data is. can 1 tell tell me how can remove line sting variable? in advance

you can use function varstring.find() find position string occurs, , use varstring.erase() erase text.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -