mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-10 00:52:11 +01:00
String.find() now correctly finds equality aswell.
This commit is contained in:
parent
97af1dbde3
commit
da6d18beef
@ -127,7 +127,7 @@ int String::find(const char val, const int from) const {
|
||||
}
|
||||
|
||||
int String::find(const String &val, const int from) const {
|
||||
int ve = _size - val.size();
|
||||
int ve = _size - val.size() + 1;
|
||||
|
||||
for (int i = from; i < ve; ++i) {
|
||||
bool found = true;
|
||||
@ -142,7 +142,7 @@ int String::find(const String &val, const int from) const {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user