General Utility Library for C++14  2.7
Namespaces | Functions
tokenize.h File Reference

Detailed Description

Implementation of tokenize(), tokenize_sv().

Authors
General Utility Library Contributors
Date
Created on September 3, 2018

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 2.1 of the license, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see https://www.gnu.org/licenses/.

#include <string>
#include <vector>
#include "gul14/internal.h"
#include "gul14/string_util.h"
#include "gul14/string_view.h"
Include dependency graph for tokenize.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 gul14
 Namespace gul14 contains all functions and classes of the General Utility Library.
 

Functions

template<typename StringContainer = std::vector<std::string>, typename ContainerInsertFct = void (*)(StringContainer&, string_view)>
StringContainer gul14::tokenize (string_view str, string_view delimiters=default_whitespace_characters, ContainerInsertFct insert_fct=detail::emplace_back< StringContainer >)
 Split the given string into a vector of substrings (tokens) delimited by any of the characters in the delimiters string. More...
 
template<typename StringContainer = std::vector<string_view>, typename ContainerInsertFct = void (*)(StringContainer&, string_view)>
StringContainer gul14::tokenize_sv (string_view str, string_view delimiters=default_whitespace_characters, ContainerInsertFct insert_fct=detail::emplace_back< StringContainer >)
 Split the given string into a vector of substrings (tokens) delimited by any of the characters in the delimiters string. More...