![]() |
The library Boot.StringAlgorithms provides many functions for string manipulations. The string can be of type std::string, std::wstring, or any instance of the class template std::basic_string. boost::algorithm:join():The join() function in the C++ boost library is included in the library “boost/algorithm/string”. This function is used to join two or more strings into one long string by adding a separator between the strings. The strings to be joined are provided in a container like a vector of string. Popular used containers are std::vector<std::string>, std::list<boost::iterator_range<std::string::iterator>. Syntax:
Parameters:
Example 1: Below is the C++ program to implement the above approach. C++
Output
Geeks For Geeks Geeks$For$Geeks
Example 2: Below is the C++ program to implement the above approach.
C++
Output
Geeks...For...Geeks
|
Reffered: https://www.geeksforgeeks.org
C++ |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 14 |