Tag Archives: cpp-string

Ropes are scalable string implementation. They are designed for efficient operation that involves the string as a whole. Operations such as assignment, concatenation, and sub-string… Read More
What is string::npos: It is a constant static member value with the highest possible value for an element of type size_t. It actually means until… Read More
The strtok() function is used in tokenizing a string based on a delimiter. It is present in the header file “string.h” and returns a pointer… Read More
Given a string str of length N, the task is to traverse the string and print all the characters of the given string. Examples: Input:… Read More
Given a string S consisting of space-separated integers, the task is to extract the Kth number present in the string. Note: The string contains at… Read More
Prerequisite: Trie | (Insert and Search) Given an array of strings words[] and a partial string str, the task is to find the strings of… Read More
Given a string str, the task is to check if string str is a substring of an infinite length string S in which lowercase alphabets… Read More
Given string str of lower case alphabets, the task is to find the minimum cost to change the input string in a string that contains… Read More
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… 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:… Read More