From 6fa0afd758a6351873df813cd7e70b1904714ed6 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Fri, 15 Mar 2024 21:28:11 +1100 Subject: experimental asset load scripts --- source/core/StarString.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/core/StarString.cpp') diff --git a/source/core/StarString.cpp b/source/core/StarString.cpp index b236656..db785e6 100644 --- a/source/core/StarString.cpp +++ b/source/core/StarString.cpp @@ -407,7 +407,7 @@ bool String::hasCharOrWhitespace(Char c) const { return hasChar(c); } -String String::replace(String const& rplc, String const& val) const { +String String::replace(String const& rplc, String const& val, CaseSensitivity cs) const { size_t index; size_t sz = size(); size_t rsz = rplc.size(); @@ -417,7 +417,7 @@ String String::replace(String const& rplc, String const& val) const { if (rplc.empty()) return *this; - index = find(rplc); + index = find(rplc, 0, cs); if (index == NPos) return *this; @@ -431,7 +431,7 @@ String String::replace(String const& rplc, String const& val) const { for (size_t i = 0; i < rsz; ++i) ++it; - size_t nindex = find(rplc, index); + size_t nindex = find(rplc, index, cs); for (size_t i = index; i < nindex && i < sz; ++i) ret.append(*it++); -- cgit v1.2.3