ATLAS Offline Software
Loading...
Searching...
No Matches
StringUtil.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5
6#ifndef ROOT_CORE_UTILS__STRING_UTIL_H
7#define ROOT_CORE_UTILS__STRING_UTIL_H
8
10#include <regex>
11#include <string>
12
13class TString;
14
15namespace RCU
16{
22 std::string substitute(std::string_view str, std::string_view pattern,
23 std::string_view with);
24
29 bool match_expr(const std::regex& expr, std::string_view str);
30
31
38 std::string glob_to_regexp(std::string_view glob);
39}
40
41#endif
This module defines a variety of assert style macros.
Definition Assert.cxx:23
bool match_expr(const std::regex &expr, std::string_view str)
returns: whether we can match the entire string with the regular expression guarantee: strong failure...
std::string substitute(std::string_view str, std::string_view pattern, std::string_view with)
effects: substitute all occurences of "pattern" with "with" in the string "str" returns: the substitu...
std::string glob_to_regexp(std::string_view glob)
returns: a string that is the regular expression equivalent of the given glob expression guarantee: s...