About 184,000 results
Open links in new tab
  1. How to remove certain characters from a string in C++?

    May 5, 2011 · INPUT: (555) 555-5555 cin >> phone; I want to remove the " (", ")", and "-" characters from the string. I've looked at the string remove, find and replace functions however …

  2. How to remove all the occurrences of a char in c++ string

    Dec 2, 2013 · In this case, remove can't change the length of the string, so it just shuffles character. Then you have to call earse to basically change the length of the string.

  3. Remove last character from C++ string - Stack Overflow

    Feb 22, 2010 · How can I remove last character from a C++ string? I tried st = substr (st.length ()-1); But it didn't work.

  4. c++ - Removing everything after character (and also character)

    May 1, 2012 · std::string string1 = "xjdfhfakdjs%54k34k.-jk34"; I need to get only ""xjdfhfakdjs", but the string is dynamic, not hardcoded so I don't know what is it, the length etc. so I wanted to …

  5. c++ - How do I delete one character from a string at a time?

    Dec 6, 2016 · I am trying to figure out how to delete one character at a time from a string, so that I can obtain all versions of the string with only one character missing at a time. This is what I am …

  6. c++ - Replace\remove character in string - Stack Overflow

    Oct 7, 2010 · I want to delete all '!' on DelStr and I want to replace all '/' with '-' on the RepStr string. Is there any way to do this without doing a loop to go through each character?

  7. C++ remove character from string - Stack Overflow

    Sep 15, 2010 · According to this, string.erase with a single size_t parameter will remove all characters from the specified position to the end of the string. A second size_t parameter may …

  8. string - Remove First and Last Character C++ - Stack Overflow

    How to remove first and last character from std::string, I am already doing the following code. But this code only removes the last character m_VirtualHostName = m_VirtualHostName.erase(

  9. C++ Remove new line from multiline string - Stack Overflow

    Jun 6, 2016 · Whats the most efficient way of removing a 'newline' from a std::string?

  10. How to get rid of string of characters in CString in C++

    Aug 1, 2012 · The CString type I am talking about is microsoft's. I've attempted two methods; Method 1) using the Remove () and Replace () function found on msdn website, and Visual …

Refresh