MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / replace

Method replace

Common/util/StringHandle.cpp:36–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36std::string StringHandle::replace(std::string &s)
37{
38 size_t i = 0,pos = std::string::npos;
39 std::string olds = "^#",news = "\\D";
40 while((i = s.find_last_of(olds,pos)) != std::string::npos)
41 {
42 s = s.replace(i,news.length(),news);
43 pos = i - 1;
44 }
45
46 olds = "#",news = "\\d";
47 pos = std::string::npos;
48 while((i = s.find_last_of(olds,pos)) != std::string::npos)
49 {
50 s = s.replace(i,news.length(),news);
51 pos = i - 1;
52 }
53 return s;
54}
55
56std::string StringHandle::StringUper(std::string str )
57{

Callers 15

lws_chunked_html_processFunction · 0.80
replaceEnterSymbMethod · 0.80
HFunction · 0.80
xcFunction · 0.80
taFunction · 0.80
zcFunction · 0.80
qbFunction · 0.80
haFunction · 0.80
feFunction · 0.80
cFunction · 0.80
AcFunction · 0.80
BcFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected