mlpack
Public Types | Public Member Functions | Static Public Member Functions | List of all members
mlpack::data::SplitByAnyOf Class Reference

The SplitByAnyOf class tokenizes a string using a set of delimiters. More...

#include <split_by_any_of.hpp>

Public Types

using TokenType = boost::string_view
 The type of the token which the tokenizer extracts.
 
using MaskType = std::array< bool, 1<< CHAR_BIT >
 A convenient alias for the mask type.
 

Public Member Functions

 SplitByAnyOf (const boost::string_view delimiters)
 Construct the object from the given delimiters. More...
 
boost::string_view operator() (boost::string_view &str) const
 The function extracts the first token from the given string view and then removes the prefix containing the token from the view. More...
 
const MaskTypeMask () const
 Return the mask.
 
MaskTypeMask ()
 Modify the mask.
 

Static Public Member Functions

static bool IsTokenEmpty (const boost::string_view token)
 The function returns true if the given token is empty. More...
 

Detailed Description

The SplitByAnyOf class tokenizes a string using a set of delimiters.

Constructor & Destructor Documentation

◆ SplitByAnyOf()

mlpack::data::SplitByAnyOf::SplitByAnyOf ( const boost::string_view  delimiters)
inline

Construct the object from the given delimiters.

Parameters
delimitersThe given delimiters.

Member Function Documentation

◆ IsTokenEmpty()

static bool mlpack::data::SplitByAnyOf::IsTokenEmpty ( const boost::string_view  token)
inlinestatic

The function returns true if the given token is empty.

Parameters
tokenThe given token.

◆ operator()()

boost::string_view mlpack::data::SplitByAnyOf::operator() ( boost::string_view str) const
inline

The function extracts the first token from the given string view and then removes the prefix containing the token from the view.

Parameters
strString view to retrieve the token from.

The documentation for this class was generated from the following file: