About 193,000 results
Open links in new tab
  1. c++ - std::wstring VS std::string - Stack Overflow

    Dec 31, 2008 · I am not able to understand the differences between std::string and std::wstring. I know wstring supports wide characters such as Unicode characters. I have got the following …

  2. c++ - How can I trim a std::string? - Stack Overflow

    If you add _copy suffix to any of above function names e.g. trim_copy, the function will return a trimmed copy of the string instead of modifying it through a reference. If you add _if suffix to …

  3. Is it possible to use std::string in a constant expression?

    There is a way to export transient std::string data outside to make it usable at runtime. You must copy it to std::array, the problem is to compute the final size of std::array, you can either preset …

  4. std::string vs string in c++ - Stack Overflow

    Mar 31, 2011 · 22 The full name of string is std::string because it resides in namespace std, the namespace in which all of the C++ standard library functions, classes, and objects reside. In …

  5. c++ - std::string formatting like sprintf - Stack Overflow

    Feb 26, 2010 · I have to format std::string with sprintf and send it into file stream. How can I do this?

  6. What's the difference between std::string and std::basic_string?

    Nov 2, 2009 · A std::string is an instantiation of the std::basic_string template with a type of char. You need both so that you can make strings of things besides char, such a …

  7. c++ - How is std::string implemented? - Stack Overflow

    Sep 23, 2009 · I am curious to know how std::string is implemented and how does it differ from c string?If the standard does not specify any implementation then any implementation with …

  8. std::string::assign vs std::string::operator= - Stack Overflow

    Dec 10, 2015 · std::string str; std::string base="123456789"; // Code before the loop is not measured for (auto _ : state) { str = base; } } BENCHMARK(string_assign_operator); Here is …

  9. c++ - std::string to char* - Stack Overflow

    Jan 20, 2017 · As the other answers have shown, you can copy the content of the std::string to a char array, or make a const char* to the content of the std::string so that you can access it in a …

  10. std::strings's capacity (), reserve () & resize () functions

    I wan to use std::string simply to create a dynamic buffer and than iterate through it using an index. Is resize() the only function to actually allocate the buffer? I tried reserve() but when I t...