E-MailRelay
Classes | Namespaces | Enumerations | Functions
gstringlist.h File Reference
#include "gdef.h"
#include "gstr.h"
#include "gstringarray.h"
#include "gstringview.h"
#include "goptional.h"
#include <string>
+ Include dependency graph for gstringlist.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  G::StringList::Filter
 Filters a list of strings with allow and deny lists. More...
 

Namespaces

namespace  G
 Low-level classes.
 
namespace  G::StringList
 Utility functions for lists of strings.
 

Enumerations

enum class  Ignore { Case , Nothing }
 

Functions

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...