05.11.2011 - stable version, 0.1.0, self-test program, work at GCC 2.95 - 4.5, VC 2010, MinGW, Linux, Windows, QNX
This commit is contained in:
@@ -203,6 +203,10 @@ PIString & PIString::replace(int from, int count, const PIString & with) {
|
||||
|
||||
|
||||
PIString & PIString::replace(const PIString & what, const PIString & with, bool * ok) {
|
||||
if (what.isEmpty()) {
|
||||
if (ok != 0) *ok = false;
|
||||
return *this;
|
||||
}
|
||||
int s = find(what);
|
||||
if (s >= 0) replace(s, what.length(), with);
|
||||
if (ok != 0) *ok = (s >= 0);
|
||||
|
||||
Reference in New Issue
Block a user