bux API Reference 1.12.6
Static library of whatever are seen required in general purpose but not directly supported from Modern C++. Or whatever reusable originated from my side projects.
Loading...
Searching...
No Matches
StrUtil.h File Reference
#include <concepts>
#include <functional>
#include <stdexcept>
#include <string>
#include <string_view>
#include <type_traits>
#include <typeinfo>
#include <utility>
Include dependency graph for StrUtil.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  bux
 THE common namespace of bux library.

Macros

#define HRTN(t)

Typedefs

template<typename S>
using bux::string_char_t = typename decltype(std::basic_string_view{std::declval<const S&>()})::value_type

Functions

const char * bux::ord_suffix (size_t i)
std::string bux::expand_env (const char *s)
std::string bux::_HRTN (const char *originalName)
std::string bux::OXCPT (const std::exception &e)
template<typename S, typename T = string_char_t<S>>
void bux::split (const S &token_list, std::type_identity_t< std::basic_string_view< T > > splitters, std::regular_invocable< std::basic_string_view< T > > auto &&apply_token, std::regular_invocable< std::basic_string_view< T > > auto &&apply_delim)
 Split token_list at any character in splitters, feeding each token to apply_token and each run of splitters between two tokens to apply_delim.
template<typename S, typename T = string_char_t<S>>
void bux::split (const S &token_list, std::type_identity_t< std::basic_string_view< T > > splitters, std::regular_invocable< std::basic_string_view< T > > auto &&apply_token)
 Same as the 4-argument overload, ignoring the delimiters between tokens.
std::string OXCPT (const std::exception &e)

Macro Definition Documentation

◆ HRTN

#define HRTN ( t)

Function Documentation

◆ OXCPT()

std::string bux::OXCPT ( const std::exception & e)
Parameters
[in]eInstance of std::exception descent
Returns
Printable form with reason

Definition at line 131 of file StrUtil.cpp.