Topics
C++ String
About this topic: Articles tagged __TAG__
Showing 42 articlesRelated tags
Topics
Articles
Showing 42 articles
How-tos
How to Trim a String in C++
Trim selected characters from the left, right, or both ends of a C++ string with find_first_not_of, find_last_not_of, and erase.
↗
How-tos
How to Capitalize First Letter of a String in C++
Learn safe C++ approaches to capitalize a string's first character, first alphabetic character, or each word.
↗
How-tos
How to Convert String to Int in C++
This article explains how to convert a string to an integer in C++
↗
How-tos
How to Reverse a String in C++
This article introduces how to reverse a string in C++. Explore various methods including using the Standard Library, loops, and recursion. Each method is explained with clear code …
↗
How-tos
How to Return a String From a Function in C++
Learn how to return std::string by value and when references, pointers, std::move, or C-style strings are appropriate.
↗
How-tos
How to Add Int to String in C++
Learn how to append an integer to a C++ string with std::to_string, std::stringstream, and std::string::append.
↗
How-tos
How to Split String in C++
This article demonstrates how to split string in C++
↗
How-tos
How to Convert String to Hex in C++
This article introduces how to convert string to hexadecimal value in C++. Learn multiple methods, including using loops, bit manipulation, and standard library functions, to …
↗
How-tos
How to Declare Multiline String in C++
This article demonstrates how to declare a multiline string in C++.
↗
How-tos
How to Split a Comma-Separated String in C++
Split a simple comma-separated string in C++ with std::stringstream and std::getline, or with std::string::find and std::string::substr.
↗
How-tos
How to Find Length of a String in C++
This article demonstrates how to find the length of a string in C++. Explore various methods, including built-in functions like length() and size(), as well as a custom loop …
↗
How-tos
How to Get the Last Character From a String in C++
This article talks about getting the last character from a string in C++.
↗
How-tos
How to Replace a Part of the String in C++
This article introduces how to replace a part of the string in C++. Learn effective methods using C++ standard library functions, including examples with std::string::replace, …
↗
How-tos
How to Tokenize a String in C++
This article demonstrates how to tokenize a string in C++. Discover effective methods using C++ standard libraries like sstream and string. Learn to break down strings into …
↗
How-tos
How to Erase String in C++
This article explains how to utilize std::string::erase function in C++. Learn the different methods to erase characters and substrings from strings in C++, complete with clear …
↗
How-tos
How to Convert String to Lower Case in C++
Learn how to convert C++ std::string to lowercase with various methods. This comprehensive guide covers using std::transform, manual iteration, and locale-sensitive conversions. …
↗
How-tos
How to Convert String to Char Array in C++
This article introduces multiple ways to convert a string to a char array in C++. Learn about methods like c_str(), copy(), and using loops, complete with code examples and …
↗
How-tos
How to Parse String Using a Delimiter in C++
This article introduces how to parse a string using a delimiter in C++. Discover various methods including std::stringstream, std::string::find, and regular expressions. Enhance …
↗
How-tos
How to Concatenate Two Strings in C++
This article introduces how to concatenate two strings in C++. Discover various methods, including using the + operator, append() method, and sprintf() function. Learn the …
↗
How-tos
How to Remove Spaces From String in C++
This article introduces how to remove spaces from string in C++. Learn various methods, including using the erase and remove functions, loops, and string streams. Gain practical …
↗
How-tos
How to Convert String Into Binary Sequence in C++
This article introduces how to convert strings into binary sequences in C++. Learn various methods, including using bitset and manual conversion, with clear code examples and …
↗
How-tos
How to Find Substring in String in C++
This article introduces multiple ways to check if a string contains a substring in C++. Explore methods like find(), substr(), and regular expressions to enhance your string …
↗
How-tos
How to Iterate Through a String in C++
This article introduces how to iterate through a string and keep the index in C++. Explore various methods including traditional for loops, range-based for loops, and iterators to …
↗
How-tos
How to Convert Char Array to String in C++
This article introduces multiple ways to convert char array to string in C++.
↗
No articles found
Try clearing the filters.