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

String algorithms, private header. More...

#include <algorithm>
#include <iterator>
#include <locale>
#include <stack>
#include <string>
#include <vector>
#include <boost/functional/hash.hpp>
#include <boost/utility/string_view.hpp>
Include dependency graph for string_utils.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  std::hash< boost::basic_string_view< CharT > >
 

Namespaces

 nuspell
 Library main namespace.
 

Macros

#define NUSPELL_STR_VIEW_NS   boost
 
#define NUSPELL_LITERAL(T, x)   ::nuspell::literal_choose<T>(x, L##x)
 

Typedefs

template<class CharT >
using nuspell::my_string_view = NUSPELL_STR_VIEW_NS::basic_string_view< CharT >
 
using nuspell::string_view = my_string_view< char >
 
using nuspell::wstring_view = my_string_view< wchar_t >
 

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_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.