Function gkfs::path::match_components(const string&, unsigned int&, const ::vector<string>&)
Defined in File path.cpp
Function Documentation
-
unsigned int gkfs::path::match_components(const string &path, unsigned int &path_components, const ::vector<string> &components)
Match components in path
Returns the number of consecutive components at start of
path
that match the ones incomponents
vector.path_components
will be set to the total number of components found inpath
Example:
unsigned int tot_comp; path_match_components("/matched/head/with/tail", &tot_comp, ["matched", "head", "no"]) == 2; tot_comp == 4;