We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Category: std::string

C++ : Case-insensitive string comparison using STL | C++11 | Boost Library

In this article we will discuss different ways to Compare strings in case insensitive manner. Suppose we have two strings i.e. Advertisements std::string str1 = “Hi This is SamPle”; std::string str2 = “hi this is sample”; Both the above strings should be equal if we compare them in case insensitive manner. Let’s see how to …

C++ : Case-insensitive string comparison using STL | C++11 | Boost LibraryRead More

Convert int to String in C++

In this article, we will learn about three different ways to convert an integer to a string in C++ i.e. Using to_string() function Using stingstream Using Boost’s lexical_cast() function. Let’s discuss them one by one. Convert int to string using to_string() C++ provides a function std::to_string() for converting values of different types to string type. …

Convert int to String in C++Read More

C++ – Check if string contains a character

In this article, we will learn about three different ways to check if a string contains a character or not. Check if a string contains a character using string::find() In C++, the string class provides different overloaded versions of function find() to search for sub-strings or characters in the string object. In one of the overloaded versions, …

C++ – Check if string contains a characterRead More

Convert float to string in C++ (3 Ways)

In this article, we will learn about three different ways to convert a float to a string in C++ i.e. Using std::to_string() function Using std::stingstream Using Boost’s lexical_cast() function. Let’s discuss them one by one. Convert float to string using to_string() C++ provides a function std::to_string() for data type conversion. We can use this to …

Convert float to string in C++ (3 Ways)Read More

Convert double to string in C++ – (3 ways)

In this article, we will learn about three different ways to convert a double to a string in C++ i.e. Using std::to_string() function Using std::stingstream Using Boost’s lexical_cast() function. Let’s discuss them one by one. Convert double to string using to_string() C++ provides a function std::to_string() for data type conversion. We can use this to …

Convert double to string in C++ – (3 ways)Read More

Convert Long to String in C++ | (3 ways)

In this article, we will learn about three different ways to convert a long to a string in C++ i.e. Using to_string() function Using stingstream Using Boost’s lexical_cast() function. Let’s discuss them one by one. Convert long to string using to_string() C++ provides a function std::to_string() for converting values of different types to string type. …

Convert Long to String in C++ | (3 ways)Read More

11
325.578,25