|
micro-test-plus 3.2.1
The µTest++ Testing Framework
|
Functions to assist in string operations. More...
Functions | |
| bool | micro_os_plus::micro_test_plus::utility::is_match (std::string_view input, std::string_view pattern) |
| Check if a string matches a pattern. | |
| template<class T = std::string_view, class Delim_T> | |
| auto | micro_os_plus::micro_test_plus::utility::split (T input, Delim_T delim) -> std::vector< T > |
| Split a string into a vector of sub-strings. | |
Functions to assist in string operations.
|
nodiscard |
Check if a string matches a pattern.
| [in] | input | String view to check. |
| [in] | pattern | Sting view with the pattern. |
For tests comparing strings, in addition to exact matches, it is also possible to check matches with patterns like * (for any characters) and ? (for a single character)
Definition at line 128 of file micro-test-plus.cpp.
|
nodiscard |
Split a string into a vector of sub-strings.
For tests handling strings, this function template allows to split a string into a vector of substrings, using a delimiter.
| T | Type of the input string. |
| Delim_T | Type of the delimiter. |
| [in] | input | Input string to split. |
| [in] | delim | Delimiter string. |