get_slice_count should return 1 by default.

This commit is contained in:
Relintai 2021-11-19 22:38:31 +01:00
parent cefea40d45
commit 6bfc78ec49

View File

@ -369,7 +369,7 @@ int String::get_slice_count(const char splitter) const {
return count;
}
int String::get_slice_count(const String &splitter) const {
int count = 0;
int count = 1;
int n = find(splitter, n);
while (n != -1) {