pls help me...i wnt to know how to delete a word from a string...cant make it out..pls help...
Jump to Post
Use substr to extract the characters before the word, after that use it again to extract the raw of characters after the word, then join both strings by summing them.
string sentence="blah blah blah"; string before=sentence.substr(0,5); string after=sentence(10,14); string withoutTheWord=before+after;
All 3 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.