Celeritas
0.5.0-56+6b053cd
|
Helper functions for string processing. More...
#include <cstdlib>
#include <string_view>
Functions | |
bool | celeritas::starts_with (std::string_view main_string, std::string_view prefix) |
Whether the string starts with another string. | |
bool | celeritas::ends_with (std::string_view main_string, std::string_view suffix) |
Whether the string ends with another string. | |
bool | celeritas::is_ignored_trailing (unsigned char c) |
Whether the character is whitespace or unprintable. | |
bool | celeritas::cstring_equal (char const *lhs, char const *rhs) |
Test C strings for equality, allowing one or the other to be null. More... | |
std::string_view | celeritas::trim (std::string_view input) |
Return a string view with leading and trailing whitespace removed. | |
Helper functions for string processing.
bool celeritas::cstring_equal | ( | char const * | lhs, |
char const * | rhs | ||
) |
Test C strings for equality, allowing one or the other to be null.
If one pointer is null, the result compares false
.