#include "gdef.h"
#include "gstr.h"
#include "gstringarray.h"
#include "gstringview.h"
#include "goptional.h"
#include <string>
Go to the source code of this file.
|
namespace | G |
| Low-level classes.
|
|
namespace | G::StringList |
| Utility functions for lists of strings.
|
|
|
enum class | Ignore { Case
, Nothing
} |
|
|
void | G::StringList::keepMatch (StringArray &list, const StringArray &allow_list, Ignore=Ignore::Nothing) |
| Removes items in the list that do not match any entry in the allow list. More...
|
|
void | G::StringList::applyMatch (StringArray &list, const StringArray &allow_list, Ignore=Ignore::Nothing) |
| Removes items in the list that do not match any entry in the allow list and reorders the result to be the same as the allow list. More...
|
|
void | G::StringList::removeMatch (StringArray &list, const StringArray &deny_list, Ignore=Ignore::Nothing) |
| Removes items in the list that match an entry in the deny list. More...
|
|
bool | G::StringList::headMatch (const StringArray &list, std::string_view head) |
| Returns true if any string in the array has the given start (or 'head' is empty). More...
|
|
bool | G::StringList::tailMatch (const StringArray &list, std::string_view ending) |
| Returns true if any string in the array has the given ending (or the given ending is empty). More...
|
|
std::string | G::StringList::headMatchResidue (const StringArray &list, std::string_view head) |
| Returns the unmatched part of the first string in the array that has the given start. More...
|
|
bool | G::StringList::match (const StringArray &, const std::string &) |
| Returns true if any string in the array matches the given string. More...
|
|
bool | G::StringList::imatch (const StringArray &, const std::string &) |
| Returns true if any string in the array matches the given string, ignoring case. More...
|
|