Skip to content

Tag Archives: cpp-string

Given a string str, two characters X and Y. The task is to find the length of the longest substring that starts with X and… Read More
Given a string str, the task is to check if that string is a Bitonic String or not. If string str is Bitonic String then… Read More
Given string str, the task is to check if characters at the odd indexes of str form a palindrome string or not. If not then… Read More
std::string::crbegin() The std::string::crbegin() is a string class built-in function that returns a constant reverse iterator referring to the last element in the string. Using this… Read More
In this article, we will create our custom string class which will have the same functionality as the existing string class.The string class has the… Read More
Given a string of digits, the task is to convert the string to an integer. Examples: Input : str = "12345" Output : 12345 Input… Read More
Given a String comprising of many words separated by space, the task is to iterate over these words of the string in C++.Example: Input: str… Read More
The Boost String Algorithms Library provides a generic implementation of string-related algorithms which are missing in STL. It is an extension to the algorithms library… Read More
This function returns a direct reference to the last character of the string. This shall only be used on non-empty strings. This can be used… Read More
This function returns a direct reference to the first character of the string. This shall only be used on non-empty strings. This can be used… Read More
Given a string S, remove all the consecutive duplicates in this string using STL in C++ Examples: Input: Geeks for geeks Output: Geks for geks… Read More
There are various ways to concatenate strings. We will discuss each one by one. Method 1: Using strcat() function. The strcat() function is defined in… Read More
Strings in C: Strings are defined as an array of characters. The difference between a character array and a string is the string is terminated… Read More
Given a string str, print reverse all words except the first and last words. Examples:  Input : Hi how are you geeks Output : Hi… Read More
Pre-requisite: Pointers in C++ Given a string of lowercase english alphabets. The task is to count number of vowels present in a string using pointers… Read More

Start Your Coding Journey Now!