Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
cetlib
cetlib
replace_all.cc
Go to the documentation of this file.
1
#include "
cetlib/replace_all.h
"
2
3
bool
4
cet::replace_all
(
std::string
& in,
5
std::string
const
& from,
6
std::string
const
& to)
7
{
8
bool
result
=
false
;
9
auto
const
rep_length = from.
size
();
10
auto
const
skip_length = to.size();
11
std::string::size_type
pos
= 0;
12
while
((pos = in.find(from, pos)) != std::string::npos) {
13
result =
true
;
14
in.replace(pos, rep_length, to);
15
pos += skip_length;
16
}
17
return
result
;
18
}
result
static QCString result
Definition:
fortranscanner.cpp:56614
string
std::string string
Definition:
nybbler.cc:12
QCString::size
uint size() const
Definition:
qcstring.h:201
cet::replace_all
bool replace_all(std::string &in, std::string const &from, std::string const &to)
Replace all occurrences of from in string with to.
Definition:
replace_all.cc:4
replace_all.h
MakeVectorFile.pos
tuple pos
Definition:
MakeVectorFile.py:68
Generated by
1.8.11