Top "Stdstring" questions

std::string is the C++ standard library's byte-based "string" type, defined in the <string> header.

char* vs std::string in c++

When should I use std::string and when should I use char* to manage arrays of chars in C++? It …

c++ stl stdstring arrays
How to construct a std::string from a std::vector<string>?

I'd like to build a std::string from a std::vector<std::string>. I could use std::stringsteam, …

c++ stl string-concatenation stringstream stdstring
Convert a number to a string with specified length in C++

I have some numbers of different length (like 1, 999, 76492, so on) and I want to convert them all to strings with …

c++ integer stdstring
How do I convert wchar_t* to std::string?

I changed my class to use std::string (based on the answer I got here but a function I have …

c++ string stdstring wchar-t
Using the less than comparison operator for strings

I'm following a tutorial for C++ and looking at strings and overloading with operators such as +=, ==, != etc. Currently I have …

c++ operator-overloading string-comparison stdstring
getting cout output to a std::string

I have the following cout statement. I use char arrays because I have to pass to vsnprintf to convert variable …

c++ cout stdstring
Value and size of an uninitialized std::string variable in c++

If a string is defined like this std::string name; What will be the value of the uninitialized string "name" …

c++ stdstring
Converting a Json::Value to std::string?

I am using JsonCpp to build a JSON object. Once the object is built, is there a way I can …

c++ stdstring jsoncpp
How do you construct a std::string with an embedded null?

If I want to construct a std::string with a line like: std::string my_string("a\0b"); Where i …

c++ null stdstring
What are some algorithms for comparing how similar two strings are?

I need to compare strings to decide whether they represent the same thing. This relates to case titles entered by …

algorithm language-agnostic string-comparison stdstring heuristics