How to remove Substrings from a String in C++
In this article we will discuss how to remove single or multiple sub strings from a given string.
How to remove Substrings from a String in C++ Read More »
In this article we will discuss how to remove single or multiple sub strings from a given string.
How to remove Substrings from a String in C++ Read More »
In this article we will discuss both case sensitive and insensitive implementations to check if a string ends with an another given string.
C++ : How to check if a String Ends With an another given String Read More »
In this article we will discuss both case sensitive and insensitive implementations to check if a string starts with an another given string.
C++ : Check if a String starts with an another given String Read More »
In this article we will discuss different ways to convert double to String or char array with or without precision i.e. double to String using C++11’s std::to_string std::to_string is introduced in c++11. Example to convert double to std::string using to_string is as follows, double num = 6789898989.33999443; //Converting using std::to_string std::string str = std::to_string(num); Output:
C++ : Convert double to string and manage precision | scientific notation Read More »
In this article we will discuss how to replace all occurrences of a sub string with new string in C++.
Find and Replace all occurrences of a sub string in C++ Read More »
In this article we will discuss how to find all occurrences / Positions of a sub string in a given string in both case sensitive & case insensitive manner. Find All Case Sensitive Occurrences of a Sub String in a given String Logic: Use std::string::find to search the first occurrence and then go on searching using
In this article we will discuss how to find a Case Insensitive Sub String in a given string in C++ using,
Implementing a Case Insensitive string::find in C++ Read More »
In this article we will discuss different ways to convert first letter of each word to upper case in a a given string i.e. Using STL algorithm Using Boost Filtered Iterator & Range Converting First Letter to Upper Case using STL Algorithm Used: Iterate over the characters in given string For each character check –
Convert First Letter of each word of a String to Upper Case in C++ Read More »
In this article, we will discuss different ways to convert a string to upper case or lower case in C++. Table Of Contents Convert a String to Upper Case using STL C++ provides a function ::toupper() that converts a character to upper case character i.e. To convert a complete string to upper case , just Iterate over
Convert a String to Uppercase or LowerCase in C++ Read More »
In this tutorial we will discuss how to use trim algorithms from C++ Boost String Algorithm Library. Let’s learn them step by step, Boost String algorithm library provides different algorithms for string trimmings. Let’s first discuss the simple one i.e, What if we want to trim the string of white spaces from left side or
How to trim strings in C++ using Boost String Algorithm Library Read More »