MySQL 8.0.39
Source Code Documentation
|
Functions | |
template<class InputIt , class Pred , class Action > | |
void | Split (InputIt first, InputIt last, Pred &&pred, Action &&action) |
Split a range into sub ranges delimited by elements satisfying a predicate. More... | |
template<class InputIt , class Pred > | |
InputIt | FindTrimmedEnd (InputIt first, InputIt last, Pred &&pred) |
Search backwards for the first occurrence of an element which does not satisfy the trimming predicate, and return an InputIt to the element after it. More... | |
template<class InputIt , class Pred > | |
std::pair< InputIt, InputIt > | FindTrimmedRange (InputIt first, InputIt last, Pred &&pred) |
Searches for a sub range such that no elements before or after fail to satisfy the trimming predicate. More... | |
Variables | |
const auto | IsSpace = [](char c) { return isspace(c); } |
Convenience lambdas for common predicates. More... | |
const auto | IsComma = [](char c) { return c == ','; } |
|
inline |
Search backwards for the first occurrence of an element which does not satisfy the trimming predicate, and return an InputIt to the element after it.
first | Beginning of the range to search. |
last | End of the range to search. |
pred | Callable which can be applied to a dereferenced InputIt and which returns true if the element should be trimmed. |
|
inline |
Searches for a sub range such that no elements before or after fail to satisfy the trimming predicate.
first | Beginning of the range to search. |
last | End of the range to search. |
pred | Callable which can be applied to a dereferenced InputIt and which returns true if the element should be trimmed. |
|
inline |
Split a range into sub ranges delimited by elements satisfying a predicate.
Examines the elements from first to last, exclusive. Each time an element which satisfies the splitting predicate is encountered, the action argument's operator() is invoked with the starting and past-the-end iterators for the current sub-range, even if this is empty. When iteration is complete, action() is called on the range between the start of the last subrange and last.
It must be possible to pass a single element with type const InputIt::value_type to is_split_element. It must be possible to pass two InputIt arguments to action.
first | Beginning of the range to split. |
last | End of the range to split. |
pred | Callable which will be invoked on each element in turn to determine if it is a splitting element. |
action | Callable which will be invoked with the beginning and one-past-the-end iterators for each subrange. |
const auto myu::IsComma = [](char c) { return c == ','; } |
const auto myu::IsSpace = [](char c) { return isspace(c); } |
Convenience lambdas for common predicates.