CPP-AP 3.0.1
Command-line argument parser for C++20
Loading...
Searching...
No Matches
ap::util Namespace Reference

Concepts

concept  c_is_none
 The concept is satisfied when T is ap::none_type.
 
concept  c_readable
 The concept is satisfied when T overloads the std::istream operator >>.
 
concept  c_trivially_readable
 The concept is satisfied when T can be constructed from const std::string&.
 
concept  c_writable
 The concept is satisfied when T overloads the std::ostream operator <<.
 
concept  c_arithmetic
 The concept is satisfied when T is an arithmetic type.
 
concept  c_argument_value_type
 The concept is used to verify the validity of the arguments' value types.
 
concept  c_one_of
 Validates that T is the same as one of the types defined by Types.
 
concept  c_valid_type
 Concept that enforces is_valid_type_v.
 
concept  c_range_of
 Validates that R is a range of type T (ignoring the cvref qualifiers).
 
concept  c_forward_range_of
 Validates that It is a forward iterator of type T (ignoring the cvref qualifiers).
 
concept  c_forward_iterator_of
 Validates that It is a forward iterator of type T (ignoring the cvref qualifiers).
 

Enumerations

enum class  type_validator : bool { type_validator::same , type_validator::convertible }
 Specifies the type validation rule. More...
 

Functions

template<typename T >
auto any_range_cast_view (const c_range_of< std::any > auto &range)
 Casts a range of std::any to a range of type T.
 
template<c_writable T>
std::string as_string (const T &value) noexcept
 Converts a value to std::string.
 
bool contains_whitespaces (std::string_view str) noexcept
 Checks whether a string contains any whitespace characters.
 
template<std::ranges::range R>
requires (c_writable<std::ranges::range_value_t<R>>)
std::string join (const R &range, const std::string_view delimiter=", ")
 Joins elements of a range into a single string with a delimiter.
 
template<typename T >
constexpr std::string_view get_demangled_type_name ()
 Retrieves the demangled name of a type T.
 

Variables

template<typename T , typename U , type_validator TV>
constexpr bool is_valid_type_v = false
 Checks if two types satisfy a given type_validator rule.
 

Function Documentation

◆ contains_whitespaces()

bool ap::util::contains_whitespaces ( std::string_view  str)
inlinenoexcept

Checks whether a string contains any whitespace characters.

Examples
/home/runner/work/cpp-ap/cpp-ap/include/ap/argument_parser.hpp.

Definition at line 34 of file string.hpp.