Nuspell
spellchecker
Namespaces | Macros | Functions
string_utils.hxx File Reference

String algorithms, private header. More...

#include <algorithm>
#include <iterator>
#include <locale>
#include <stack>
#include <string>
#include <vector>
Include dependency graph for string_utils.hxx:

Go to the source code of this file.

Namespaces

 nuspell
 Library main namespace.
 

Macros

#define LITERAL(T, x)   ::nuspell::literal_choose<T>(x, L##x)
 

Functions

template<class CharT >
auto constexpr nuspell::literal_choose (const char *narrow, const wchar_t *wide)
 
template<>
auto constexpr nuspell::literal_choose< char > (const char *narrow, const wchar_t *)
 
template<>
auto constexpr nuspell::literal_choose< wchar_t > (const char *, const wchar_t *wide)
 
template<class CharT , class SepT , class OutIt >
auto nuspell::split_on_any_of (const std::basic_string< CharT > &s, const SepT &sep, OutIt out)
 Splits string on set of single char seperators. More...
 
template<class CharT , class OutIt >
auto nuspell::split (const std::basic_string< CharT > &s, CharT sep, OutIt out)
 Splits string on single char seperator. More...
 
template<class CharT , class OutIt >
auto nuspell::split (const std::basic_string< CharT > &s, const std::basic_string< CharT > &sep, OutIt out)
 Splits string on string separator. More...
 
template<class CharT , class OutIt >
auto nuspell::split (const std::basic_string< CharT > &s, const CharT *sep, OutIt out)
 Splits string on string separator. More...
 
template<class CharT , class CharOrStr >
auto nuspell::split_v (const std::basic_string< CharT > &s, const CharOrStr &sep, std::vector< std::basic_string< CharT >> &v)
 Splits string on seperator, output to vector of strings. More...
 
template<class CharT , class CharOrStr >
auto nuspell::split_first (const std::basic_string< CharT > &s, const CharOrStr &sep) -> std::basic_string< CharT >
 Gets the first token of a splitted string. More...
 
template<class CharT , class OutIt >
auto nuspell::split_on_whitespace (const std::basic_string< CharT > &s, OutIt out, const std::locale &loc=std::locale()) -> OutIt
 Splits on whitespace. More...
 
template<class CharT >
auto nuspell::split_on_whitespace_v (const std::basic_string< CharT > &s, std::vector< std::basic_string< CharT >> &v, const std::locale &loc=std::locale()) -> void
 Splits on whitespace, outputs to vector of strings. More...
 
template<class CharT >
auto & nuspell::erase_chars (std::basic_string< CharT > &s, const std::basic_string< CharT > &erase_chars)
 
template<class CharT >
auto & nuspell::replace_char (std::basic_string< CharT > &s, CharT from, CharT to)
 
template<class CharT >
auto nuspell::is_number (const std::basic_string< CharT > &s) -> bool
 Tests if word is a number. More...
 
template<class DataIter , class PatternIter , class FuncEq = std::equal_to<>>
auto nuspell::match_simple_regex (DataIter data_first, DataIter data_last, PatternIter pat_first, PatternIter pat_last, FuncEq eq=FuncEq())
 
template<class DataRange , class PatternRange , class FuncEq = std::equal_to<>>
auto nuspell::match_simple_regex (const DataRange &data, const PatternRange &pattern, FuncEq eq=FuncEq())
 

Detailed Description

String algorithms, private header.