I'm using windows 7 and Visual C++. I have a console program and I am trying to trim a string at the begining and the end. TrimLeft() and TrimRight() don't seem to work without MFC. Here is what I have so far.
pBrowser->get_LocationURL(&bstr); wprintf(L" URL: %s\n\n", bstr); SysFreeString(bstr); std::wstring s; s = bstr; s.TrimStart("http://"); s.TrimEnd("/*"); wprintf(L" URL: %s\n\n", s); I'm trying to go from this:
"http://www.stackoverflow.com/questions/ask"
to this:
"www.stackoverflow.com"