|
template<typename T = unsigned, typename ReturnT = BitFunctionReturnType<T>> |
constexpr auto | bit_set (unsigned bit) noexcept -> ReturnT |
| Set a bit in an integral type. More...
|
|
template<typename T , typename ReturnT = BitFunctionReturnType<T>> |
constexpr auto | bit_set (T previous, unsigned bit) noexcept -> ReturnT |
| Set a bit in an integral value. More...
|
|
template<typename T , typename ReturnT = BitFunctionReturnType<T>> |
constexpr auto | bit_reset (T previous, unsigned bit) noexcept -> ReturnT |
| Reset a bit in an integral value. More...
|
|
template<typename T , typename ReturnT = BitFunctionReturnType<T>> |
constexpr auto | bit_flip (T previous, unsigned bit) noexcept -> ReturnT |
| Flip a bit in an integral value. More...
|
|
template<typename T > |
constexpr bool | bit_test (T bits, unsigned bit) noexcept |
| Test a bit in an integral value. More...
|
|
constexpr bool | is_big_endian () |
| Determine whether this platform uses big-endian (Motorola) order for storing multi-byte quantities in memory. More...
|
|
constexpr bool | is_little_endian () |
| Determine whether this platform uses little-endian (Intel) order for storing multi-byte quantities in memory. More...
|
|
constexpr char | lowercase_ascii (char c) noexcept |
| Return the ASCII lowercase equivalent of the given character (or the unchanged character, if it is not an ASCII letter). More...
|
|
GUL_EXPORT std::string | lowercase_ascii (gul14::string_view str) |
| Return a copy of the given string in which all ASCII characters are replaced by their lowercase equivalents. More...
|
|
GUL_EXPORT std::string & | lowercase_ascii_inplace (std::string &str) noexcept |
| Replace all ASCII characters in a string by their lowercase equivalents. More...
|
|
constexpr char | uppercase_ascii (char c) noexcept |
| Return the ASCII uppercase equivalent of the given character (or the unchanged character, if it is not an ASCII letter). More...
|
|
GUL_EXPORT std::string | uppercase_ascii (gul14::string_view str) |
| Return a copy of the given string in which all ASCII characters are replaced by their uppercase equivalents. More...
|
|
GUL_EXPORT std::string & | uppercase_ascii_inplace (std::string &str) noexcept |
| Replace all ASCII characters in a string by their uppercase equivalents. More...
|
|
std::string | cat () |
| Efficiently concatenate an arbitrary number of strings and numbers. More...
|
|
std::string | cat (const ConvertingStringView &s) |
|
GUL_EXPORT std::string | cat (const ConvertingStringView &s1, const ConvertingStringView &s2) |
|
GUL_EXPORT std::string | cat (const ConvertingStringView &s1, const ConvertingStringView &s2, const ConvertingStringView &s3) |
|
GUL_EXPORT std::string | cat (std::initializer_list< ConvertingStringView > pieces) |
|
template<typename... Args, typename = std::enable_if_t<(sizeof...(Args) > 3)>> |
std::string | cat (const Args &... args) |
|
GUL_EXPORT std::string | escape (string_view in) |
| Create a new string that looks like an ASCII-only C string literal of the input string. More...
|
|
GUL_EXPORT std::string | unescape (string_view in) |
| Evaluate a string with escaped characters to get the original string back. More...
|
|
template<typename F > |
FinalAction< typename std::decay_t< F > > | finally (F &&f) noexcept |
| finally() - convenience function to generate a FinalAction More...
|
|
template<typename IntTypeA , typename IntTypeB > |
constexpr auto | gcd (IntTypeA a, IntTypeB b) |
| Calculate the greatest common divisor of two integers using the Euclidean algorithm. More...
|
|
template<typename IntTypeA , typename IntTypeB > |
constexpr auto | lcm (IntTypeA a, IntTypeB b) |
| Calculate the least common multiple of two integers. More...
|
|
template<typename IteratorT , typename = std::enable_if_t<detail::IsHexDumpIterator<IteratorT>::value>> |
std::string | hexdump (IteratorT begin, IteratorT end, string_view prompt="") |
| Generate a hexdump of a data range and return it as a string. More...
|
|
template<typename ContainerT , typename = std::enable_if_t<detail::IsHexDumpContainer<ContainerT>::value>> |
std::string | hexdump (const ContainerT &cont, string_view prompt="") |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
template<typename IteratorT , typename = std::enable_if_t<detail::IsHexDumpIterator<IteratorT>::value>> |
HexdumpParameterForward< const IteratorT > | hexdump_stream (const IteratorT &begin, const IteratorT &end, std::string prompt="") |
| Generate a hexdump of a data range that can be efficiently written to a stream using operator<<. More...
|
|
template<typename ContainerT , typename = std::enable_if_t<detail::IsHexDumpContainer<ContainerT>::value>> |
HexdumpParameterForward< const decltype(std::declval< ContainerT >).cbegin())> | hexdump_stream (const ContainerT &cont, std::string prompt="") |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
template<typename ContainerT , typename = std::enable_if_t<detail::IsHexDumpContainer<ContainerT>::value, decltype(HexdumpParameterForward<decltype(std::declval<ContainerT>().cbegin()), ContainerT> {}, 0)>> |
HexdumpParameterForward< decltype(std::declval< ContainerT >).cbegin()), ContainerT > | hexdump_stream (ContainerT &&cont, std::string prompt="") |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
template<typename StringContainer = std::vector<std::string>, typename ContainerInsertFct = void (*)(StringContainer&, string_view)> |
StringContainer | split (string_view text, string_view delimiter, ContainerInsertFct insert_fct=detail::emplace_back< StringContainer >) |
| Separate a string at all occurrences of a delimiter, returning the strings between the delimiters in a container. More...
|
|
template<typename StringContainer = std::vector<std::string>, typename ContainerInsertFct = void (*)(StringContainer&, string_view)> |
StringContainer | split (string_view text, const std::regex &delimiter, ContainerInsertFct insert_fct=detail::emplace_back< StringContainer >) |
| Separate a string at all occurrences of a delimiter described by a regular expression, returning the strings between the delimiters in a container. More...
|
|
template<typename StringContainer = std::vector<string_view>, typename ContainerInsertFct = void (*)(StringContainer&, string_view)> |
StringContainer | split_sv (string_view text, string_view delimiter, ContainerInsertFct insert_fct=detail::emplace_back< StringContainer >) |
| Separate a string at all occurrences of a delimiter, returning the strings between the delimiters in a vector. More...
|
|
template<typename Iterator > |
std::string | join (Iterator begin, Iterator end, string_view glue) |
| Concatenate all strings in a range, placing a delimiter between them. More...
|
|
template<typename StringContainer > |
std::string | join (const StringContainer &parts, string_view glue) |
| Concatenate all strings in a range, placing a delimiter between them. More...
|
|
template<typename ValueT > |
constexpr auto | abs (ValueT n) noexcept -> std::enable_if_t< std::is_unsigned< ValueT >::value, ValueT > |
| Compute the absolute value of a number. More...
|
|
template<typename NumT , typename OrderT , typename = std::enable_if_t< std::is_arithmetic<NumT>::value and std::is_arithmetic<OrderT>::value >> |
bool | within_orders (const NumT a, const NumT b, const OrderT orders) noexcept(false) |
| Determine if two numbers are almost equal, comparing only some significant digits. More...
|
|
template<typename NumT > |
bool | within_abs (NumT a, NumT b, NumT tol) noexcept |
| Determine if two numbers are almost equal, allowing for an absolute difference. More...
|
|
template<typename NumT , typename = std::enable_if_t<std::is_floating_point<NumT>::value>> |
bool | within_ulp (NumT a, NumT b, unsigned int ulp) |
| Determine if two numbers are almost equal, allowing for a difference of a given number of units-in-the-last-place (ULPs). More...
|
|
template<class NumT > |
constexpr const NumT & | clamp (const NumT &v, const NumT &lo, const NumT &hi) |
| Coerce a value to be within a given range. More...
|
|
template<class NumT , class Compare > |
constexpr const NumT & | clamp (const NumT &v, const NumT &lo, const NumT &hi, Compare comp) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
GUL_EXPORT std::string | replace (string_view haystack, string_view needle, string_view hammer) |
| Replace all occurrences of a string within another string, returning the result as a std::string. More...
|
|
GUL_EXPORT std::string & | replace_inplace (std::string &haystack, string_view needle, string_view hammer) |
| Replace all occurrences of a string within another string in-place. More...
|
|
template<typename ElementT , size_t in_capacity> |
void | swap (SmallVector< ElementT, in_capacity > &a, SmallVector< ElementT, in_capacity > &b) |
| Exchange the contents of one SmallVector with those of another one. More...
|
|
template<typename ElementType , std::size_t Extent> |
span< const unsigned char,((Extent==dynamic_extent) ? dynamic_extent :sizeof(ElementType) *Extent)> | as_bytes (span< ElementType, Extent > s) noexcept |
| Return a constant view to the byte representation of the elements of a given span. More...
|
|
template<class ElementType , size_t Extent, typename std::enable_if<!std::is_const< ElementType >::value, int >::type = 0> |
span< unsigned char,((Extent==dynamic_extent) ? dynamic_extent :sizeof(ElementType) *Extent)> | as_writable_bytes (span< ElementType, Extent > s) noexcept |
| Return a writable view to the byte representation of the elements of a given span. More...
|
|
template<std::size_t N, typename E , std::size_t S> |
constexpr auto | get (span< E, S > s) -> decltype(s[N]) |
| Return a reference to the Nth element of a given span. More...
|
|
template<typename ElementT > |
auto | ElementAccessor () |
| Return a mock element accessor for containers. More...
|
|
template<typename ResultT = statistics_result_type, typename ContainerT , typename ElementT = typename ContainerT::value_type, typename Accessor = std::result_of_t<decltype(ElementAccessor<ElementT>())(ElementT)>(*)(ElementT const&), typename DataT = typename std::decay_t<std::result_of_t<Accessor(ElementT)>>, typename = std::enable_if_t<IsContainerLike<ContainerT>::value>> |
auto | mean (ContainerT const &container, Accessor accessor=ElementAccessor< ElementT >()) -> ResultT |
| Calculate the arithmetic mean value of all elements in a container. More...
|
|
template<typename ResultT = statistics_result_type, typename ContainerT , typename ElementT = typename ContainerT::value_type, typename Accessor = std::result_of_t<decltype(ElementAccessor<ElementT>())(ElementT)>(*)(ElementT const&), typename DataT = typename std::decay_t<std::result_of_t<Accessor(ElementT)>>, typename = std::enable_if_t<IsContainerLike<ContainerT>::value>> |
auto | rms (ContainerT const &container, Accessor accessor=ElementAccessor< ElementT >()) -> ResultT |
| Calculate the root mean square of all elements in a container. More...
|
|
template<typename ResultT = statistics_result_type, typename ContainerT , typename ElementT = typename ContainerT::value_type, typename Accessor = std::result_of_t<decltype(ElementAccessor<ElementT>())(ElementT)>(*)(ElementT const&), typename DataT = typename std::decay_t<std::result_of_t<Accessor(ElementT)>>, typename = std::enable_if_t<IsContainerLike<ContainerT>::value>> |
auto | median (ContainerT const &container, Accessor accessor=ElementAccessor< ElementT >()) -> ResultT |
| Find the median of all elements in a container. More...
|
|
template<typename ContainerT , typename ElementT = typename ContainerT::value_type, typename Accessor = std::result_of_t<decltype(ElementAccessor<ElementT>())(ElementT)>(*)(ElementT const&), typename DataT = typename std::decay_t<std::result_of_t<Accessor(ElementT)>>, typename = std::enable_if_t<IsContainerLike<ContainerT>::value>> |
auto | maximum (ContainerT const &container, Accessor accessor=ElementAccessor< ElementT >()) -> DataT |
| Return the maximum element value in a container. More...
|
|
template<typename ContainerT , typename ElementT = typename ContainerT::value_type, typename Accessor = std::result_of_t<decltype(ElementAccessor<ElementT>())(ElementT)>(*)(ElementT const&), typename DataT = typename std::decay_t<std::result_of_t<Accessor(ElementT)>>, typename = std::enable_if_t<IsContainerLike<ContainerT>::value>> |
auto | minimum (ContainerT const &container, Accessor accessor=ElementAccessor< ElementT >()) -> DataT |
| Return the minimum element value in a container. More...
|
|
template<typename ContainerT , typename ElementT = typename ContainerT::value_type, typename Accessor = std::result_of_t<decltype(ElementAccessor<ElementT>())(ElementT)>(*)(ElementT const&), typename DataT = typename std::decay_t<std::result_of_t<Accessor(ElementT)>>, typename = std::enable_if_t<IsContainerLike<ContainerT>::value>> |
auto | min_max (ContainerT const &container, Accessor accessor=ElementAccessor< ElementT >()) -> MinMax< DataT > |
| Find the minimum and maximum element values in a container. More...
|
|
template<typename ContainerT , typename ElementT = typename ContainerT::value_type, typename Accessor = std::result_of_t<decltype(ElementAccessor<ElementT>())(ElementT)>(*)(ElementT const&), typename DataT = typename std::decay_t<std::result_of_t<Accessor(ElementT)>>, typename = std::enable_if_t<IsContainerLike<ContainerT>::value>> |
auto | remove_outliers (ContainerT &&cont, std::size_t outliers, Accessor accessor=ElementAccessor< ElementT >()) -> ContainerT & |
| Remove elements that are far away from other elements. More...
|
|
template<typename ContainerT , typename ElementT = typename ContainerT::value_type, typename Accessor = std::result_of_t<decltype(ElementAccessor<ElementT>())(ElementT)>(*)(ElementT const&), typename DataT = typename std::decay_t<std::result_of_t<Accessor(ElementT)>>, typename = std::enable_if_t<IsContainerLike<ContainerT>::value>> |
auto | remove_outliers (ContainerT const &cont, std::size_t outliers, Accessor accessor=ElementAccessor< ElementT >()) -> std::vector< ElementT > |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.The original container is not modified. More...
|
|
template<typename ResultT = statistics_result_type, typename ContainerT , typename ElementT = typename ContainerT::value_type, typename Accessor = std::result_of_t<decltype(ElementAccessor<ElementT>())(ElementT)>(*)(ElementT const&), typename DataT = typename std::decay_t<std::result_of_t<Accessor(ElementT)>>, typename = std::enable_if_t<IsContainerLike<ContainerT>::value>> |
auto | standard_deviation (ContainerT const &container, Accessor accessor=ElementAccessor< ElementT >()) -> StandardDeviationMean< ResultT > |
| Calculate the standard deviation of all elements in a container. More...
|
|
template<typename ResultT = statistics_result_type, typename ContainerT , typename ElementT = typename ContainerT::value_type, typename Accessor = std::result_of_t<decltype(ElementAccessor<ElementT>())(ElementT)>(*)(ElementT const&), typename DataT = typename std::decay_t<std::result_of_t<Accessor(ElementT)>>, typename OpClosure , typename = std::enable_if_t<IsContainerLike<ContainerT>::value>> |
auto | accumulate (ContainerT const &container, OpClosure op, Accessor accessor=ElementAccessor< ElementT >()) -> ResultT |
| Calculate some aggregate value from all elements of a container. More...
|
|
template<typename ResultT = statistics_result_type, typename IteratorT , typename ElementT = std::decay_t<decltype(*std::declval<IteratorT>())>, typename Accessor = std::result_of_t<decltype(ElementAccessor<ElementT>())(ElementT)>(*)(ElementT const&), typename DataT = std::decay_t<std::result_of_t<Accessor(ElementT)>>> |
auto | mean (IteratorT const &begin, IteratorT const &end, Accessor accessor=ElementAccessor< ElementT >()) -> ResultT |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
template<typename ResultT = statistics_result_type, typename IteratorT , typename ElementT = std::decay_t<decltype(*std::declval<IteratorT>())>, typename Accessor = std::result_of_t<decltype(ElementAccessor<ElementT>())(ElementT)>(*)(ElementT const&), typename DataT = std::decay_t<std::result_of_t<Accessor(ElementT)>>> |
auto | rms (IteratorT const &begin, IteratorT const &end, Accessor accessor=ElementAccessor< ElementT >()) -> ResultT |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
template<typename ResultT = statistics_result_type, typename IteratorT , typename ElementT = std::decay_t<decltype(*std::declval<IteratorT>())>, typename Accessor = std::result_of_t<decltype(ElementAccessor<ElementT>())(ElementT)>(*)(ElementT const&), typename DataT = std::decay_t<std::result_of_t<Accessor(ElementT)>>> |
auto | median (IteratorT const &begin, IteratorT const &end, Accessor accessor=ElementAccessor< ElementT >()) -> ResultT |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
template<typename IteratorT , typename ElementT = std::decay_t<decltype(*std::declval<IteratorT>())>, typename Accessor = std::result_of_t<decltype(ElementAccessor<ElementT>())(ElementT)>(*)(ElementT const&), typename DataT = std::decay_t<std::result_of_t<Accessor(ElementT)>>> |
auto | maximum (IteratorT const &begin, IteratorT const &end, Accessor accessor=ElementAccessor< ElementT >()) -> DataT |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
template<typename IteratorT , typename ElementT = std::decay_t<decltype(*std::declval<IteratorT>())>, typename Accessor = std::result_of_t<decltype(ElementAccessor<ElementT>())(ElementT)>(*)(ElementT const&), typename DataT = std::decay_t<std::result_of_t<Accessor(ElementT)>>> |
auto | minimum (IteratorT const &begin, IteratorT const &end, Accessor accessor=ElementAccessor< ElementT >()) -> DataT |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
template<typename IteratorT , typename ElementT = std::decay_t<decltype(*std::declval<IteratorT>())>, typename Accessor = std::result_of_t<decltype(ElementAccessor<ElementT>())(ElementT)>(*)(ElementT const&), typename DataT = std::decay_t<std::result_of_t<Accessor(ElementT)>>> |
auto | min_max (IteratorT const &begin, IteratorT const &end, Accessor accessor=ElementAccessor< ElementT >()) -> MinMax< DataT > |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
template<typename IteratorT , typename ElementT = std::decay_t<decltype(*std::declval<IteratorT>())>, typename Accessor = std::result_of_t<decltype(ElementAccessor<ElementT>())(ElementT)>(*)(ElementT const&), typename DataT = std::decay_t<std::result_of_t<Accessor(ElementT)>>> |
auto | remove_outliers (IteratorT const &begin, IteratorT const &end, std::size_t outliers, Accessor accessor=ElementAccessor< ElementT >()) -> std::vector< ElementT > |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.The original container is not modified. More...
|
|
template<typename ResultT = statistics_result_type, typename IteratorT , typename ElementT = std::decay_t<decltype(*std::declval<IteratorT>())>, typename Accessor = std::result_of_t<decltype(ElementAccessor<ElementT>())(ElementT)>(*)(ElementT const&), typename DataT = std::decay_t<std::result_of_t<Accessor(ElementT)>>> |
auto | standard_deviation (IteratorT const &begin, IteratorT const &end, Accessor accessor=ElementAccessor< ElementT >()) -> StandardDeviationMean< ResultT > |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
template<typename ResultT = statistics_result_type, typename IteratorT , typename ElementT = std::decay_t<decltype(*std::declval<IteratorT>())>, typename Accessor = std::result_of_t<decltype(ElementAccessor<ElementT>())(ElementT)>(*)(ElementT const&), typename DataT = std::decay_t<std::result_of_t<Accessor(ElementT)>>, typename OpClosure > |
auto | accumulate (IteratorT const &begin, IteratorT const &end, OpClosure op, Accessor accessor=ElementAccessor< ElementT >()) -> ResultT |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
template<typename Integer , std::enable_if_t< std::is_integral< Integer >::value, bool > = true> |
std::string | hex_string (Integer v) |
| Return the hexadecimal ASCII representation of an integer value. More...
|
|
template<typename Iterator > |
std::string | hex_string (Iterator begin, Iterator end, string_view separator="") |
| Return the hexadecimal ASCII representation of a range of integer values. More...
|
|
template<typename Integer , size_t num_elements, std::enable_if_t< std::is_integral< Integer >::value, bool > = true> |
std::string | hex_string (const Integer(&array)[num_elements], string_view separator="") |
| Return the hexadecimal ASCII representation of an array with integer values. More...
|
|
template<typename Container , std::enable_if_t< IsContainerLike< Container >::value, bool > = true> |
std::string | hex_string (const Container &container, string_view separator="") |
| Return the hexadecimal ASCII representation of a container with integer values. More...
|
|
GUL_EXPORT std::string | repeat (gul14::string_view str, std::size_t n) |
| Repeat a string N times. More...
|
|
GUL_EXPORT std::string | safe_string (const char *char_ptr, std::size_t length) |
| Safely construct a std::string from a char pointer and a length. More...
|
|
constexpr bool | contains (string_view haystack, string_view needle) noexcept |
| Determine whether a string contains another string. More...
|
|
constexpr bool | contains (string_view haystack, char needle) noexcept |
| Determine whether a string contains a certain character. More...
|
|
constexpr bool | ends_with (string_view str, string_view suffix) noexcept |
| Determine whether a string ends with another string. More...
|
|
constexpr bool | ends_with (string_view str, char c) noexcept |
| Determine whether a string ends with a certain character. More...
|
|
constexpr bool | starts_with (string_view str, string_view prefix) noexcept |
| Determine whether a string starts with another string. More...
|
|
constexpr bool | starts_with (string_view str, char c) noexcept |
| Determine whether a string starts with a certain character. More...
|
|
constexpr bool | equals_nocase (string_view str1, string_view str2) noexcept |
| Determine whether a string is equal to another one, making no distinction between upper and lower case ASCII characters. More...
|
|
constexpr bool | contains_nocase (string_view haystack, string_view needle) noexcept |
| Determine whether a string contains another string. More...
|
|
constexpr bool | contains_nocase (string_view haystack, char needle) noexcept |
| Determine whether a string contains a certain character. More...
|
|
constexpr bool | ends_with_nocase (string_view str, string_view suffix) noexcept |
| Determine whether a string ends with another string. More...
|
|
constexpr bool | ends_with_nocase (string_view str, char c) noexcept |
| Determine whether a string ends with a certain character. More...
|
|
constexpr bool | starts_with_nocase (string_view str, string_view prefix) noexcept |
| Determine whether a string starts with another string. More...
|
|
constexpr bool | starts_with_nocase (string_view str, char c) noexcept |
| Determine whether a string starts with a certain character. More...
|
|
std::shared_ptr< ThreadPool > | make_thread_pool (std::size_t num_threads, std::size_t capacity=ThreadPool::default_capacity) |
| Create a thread pool with the desired number of threads and the specified capacity for queuing tasks. More...
|
|
std::chrono::steady_clock::time_point | tic () |
| Return the current time as a std::chrono time_point. More...
|
|
template<class TimeUnitType = std::chrono::duration<double>> |
auto | toc (std::chrono::steady_clock::time_point t0) |
| Return the elapsed time in seconds (or a different unit) since the given time point. More...
|
|
template<class Rep , class Period > |
bool | sleep (const std::chrono::duration< Rep, Period > &duration, const Trigger &trg) |
| Sleep for at least the given time span, with the option of being woken up from another thread. More...
|
|
bool | sleep (double seconds, const Trigger &trg) |
| Sleep for a given number of seconds, with the option of being woken up from another thread. More...
|
|
template<class Rep , class Period > |
bool | sleep (const std::chrono::duration< Rep, Period > &duration) |
| Sleep for a given time span. More...
|
|
bool | sleep (double seconds) |
| Sleep for a given number of seconds. More...
|
|
template<typename NumberType > |
constexpr std::enable_if_t< std::is_integral< NumberType >::value and std::is_unsigned< NumberType >::value, optional< NumberType > > | to_number (gul14::string_view str) noexcept |
| Convert an ASCII string_view into a number. More...
|
|
template<typename NumberType > |
constexpr std::enable_if_t< std::is_integral< NumberType >::value and std::is_signed< NumberType >::value, optional< NumberType > > | to_number (gul14::string_view str) noexcept |
|
template<typename NumberType > |
constexpr std::enable_if_t< std::is_floating_point< NumberType >::value, optional< NumberType > > | to_number (gul14::string_view str) noexcept |
|
template<> |
constexpr optional< bool > | to_number< bool > (gul14::string_view str) noexcept |
|
template<typename StringContainer = std::vector<std::string>, typename ContainerInsertFct = void (*)(StringContainer&, string_view)> |
StringContainer | 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 | 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...
|
|
template<typename F , typename... Args> |
constexpr auto | invoke (F &&f, Args &&... args) noexcept(noexcept(detail_invoke::invoke(std::forward< F >(f), std::forward< Args >(args)...))) -> decltype(detail_invoke::invoke(std::forward< F >(f), std::forward< Args >(args)...)) |
| Invoke a callable object f with the given arguments. More...
|
|
GUL_EXPORT std::string | trim (string_view str, string_view ws_chars=default_whitespace_characters) |
| Trim leading and trailing whitespace (or a custom set of characters) from a string, returning a new std::string. More...
|
|
GUL_EXPORT string_view | trim_sv (string_view str, string_view ws_chars=default_whitespace_characters) |
| Trim leading and trailing whitespace (or a custom set of characters) from a string, returning a view into the original string. More...
|
|
GUL_EXPORT std::string | trim_left (string_view str, string_view ws_chars=default_whitespace_characters) |
| Trim leading whitespace (or a custom set of characters) from a string, returning a new std::string. More...
|
|
GUL_EXPORT string_view | trim_left_sv (string_view str, string_view ws_chars=default_whitespace_characters) |
| Trim leading whitespace (or a custom set of characters) from a string, returning a view into the original string. More...
|
|
GUL_EXPORT std::string | trim_right (string_view str, string_view ws_chars=default_whitespace_characters) |
| Trim trailing whitespace (or a custom set of characters) from a string, returning a new std::string. More...
|
|
GUL_EXPORT string_view | trim_right_sv (string_view str, string_view ws_chars=default_whitespace_characters) |
| Trim trailing whitespace (or a custom set of characters) from a string, returning a view into the original string. More...
|
|
template<class T > |
constexpr string_view | type_name () |
| Generate a human readable string describing a type. More...
|
|
constexpr bool | operator< (monostate, monostate) noexcept |
|
constexpr bool | operator> (monostate, monostate) noexcept |
|
constexpr bool | operator<= (monostate, monostate) noexcept |
|
constexpr bool | operator>= (monostate, monostate) noexcept |
|
constexpr bool | operator== (monostate, monostate) noexcept |
|
constexpr bool | operator!= (monostate, monostate) noexcept |
|
template<typename Visitor , typename... Variants> |
constexpr decltype(auto) | visit (Visitor &&visitor_fct, Variants &&... variants) |
| Call a visitor function with the actual objects stored in the given variants. More...
|
|
template<typename... Fct> |
auto | make_overload_set (Fct... f) |
| Create an OverloadSet from an arbitrary number of function objects. More...
|
|