Lines Matching refs:String
73 bool Regex::match(StringRef String, SmallVectorImpl<StringRef> *Matches){ in match() argument
83 pm[0].rm_eo = String.size(); in match()
85 int rc = llvm_regexec(preg, String.data(), nmatch, pm.data(), REG_STARTEND); in match()
107 Matches->push_back(StringRef(String.data()+pm[i].rm_so, in match()
115 std::string Regex::sub(StringRef Repl, StringRef String, in sub() argument
123 if (!match(String, &Matches)) in sub()
124 return String; in sub()
128 std::string Res(String.begin(), Matches[0].begin()); in sub()
186 Res += StringRef(Matches[0].end(), String.end() - Matches[0].end()); in sub()
201 std::string Regex::escape(StringRef String) { in escape() argument
203 for (unsigned i = 0, e = String.size(); i != e; ++i) { in escape()
204 if (strchr(RegexMetachars, String[i])) in escape()
206 RegexStr += String[i]; in escape()