All you need is this:
http://www.cplusplus.com/reference/string/string/find/[
^],
http://www.cplusplus.com/reference/string/string/erase/[
^].
If you are using "regular" null-terminated strings instead, you have two options: 1) stop using then and switch to
std::string
; 2) initialize some instances of
std::string
, perform required operations and get back to null-terminated when you need them.
If you use MFC, you can alternatively use MFC
CString
. Please see:
http://msdn.microsoft.com/en-us/library/ms174288%28v=vs.110%29.aspx[
^].
Be sure you consult proper documentation before asking questions. This is the reference you need the most:
Microsoft Q209354 :-).
(No offense, please; this is what you really want :-).)
—SA