ATLAS Offline Software
Loading...
Searching...
No Matches
StringUtil.h File Reference
#include <RootCoreUtils/Global.h>
#include <regex>
#include <string>
Include dependency graph for StringUtil.h:

Go to the source code of this file.

Namespaces

namespace  RCU
 This module defines a variety of assert style macros.

Functions

std::string RCU::substitute (const std::string &str, const std::string &pattern, const std::string &with)
 effects: substitute all occurences of "pattern" with "with" in the string "str" returns: the substituted string guarantee: out of memory II requires: !pattern.empty()
bool RCU::match_expr (const std::regex &expr, const std::string &str)
 returns: whether we can match the entire string with the regular expression guarantee: strong failures: out of memory II
std::string RCU::glob_to_regexp (const std::string &glob)
 returns: a string that is the regular expression equivalent of the given glob expression guarantee: strong failures: out of memory II rationale: I am returning a TString instead of an std::string, so that this can be passed directly into regexp