From 3d141a2f4abead104f6ba348048e09dfeb768cba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Thu, 1 Sep 2022 23:33:43 -0700 Subject: [PATCH] Cleanup. --- include/bx/inline/string.inl | 16 ---------------- include/bx/string.h | 4 ---- 2 files changed, 20 deletions(-) diff --git a/include/bx/inline/string.inl b/include/bx/inline/string.inl index b622142..a696f34 100644 --- a/include/bx/inline/string.inl +++ b/include/bx/inline/string.inl @@ -37,22 +37,6 @@ namespace bx va_end(argList); } - template - inline Ty replaceAll(const Ty& _str, const char* _from, const char* _to) - { - Ty str = _str; - typename Ty::size_type startPos = 0; - const typename Ty::size_type fromLen = strLen(_from); - const typename Ty::size_type toLen = strLen(_to); - while ( (startPos = str.find(_from, startPos) ) != Ty::npos) - { - str.replace(startPos, fromLen, _to); - startPos += toLen; - } - - return str; - } - inline StringView::StringView() { clear(); diff --git a/include/bx/string.h b/include/bx/string.h index 3fd2a22..d6629dc 100644 --- a/include/bx/string.h +++ b/include/bx/string.h @@ -310,10 +310,6 @@ namespace bx template void stringPrintf(Ty& _out, const char* _format, ...); - /// Replace all instances of substring. - template - Ty replaceAll(const Ty& _str, const char* _from, const char* _to); - /// Convert size in bytes to human readable string kibi units. int32_t prettify(char* _out, int32_t _count, uint64_t _value, Units::Enum _units = Units::Kibi);