This commit is contained in:
Бранимир Караџић
2022-09-01 23:33:43 -07:00
parent fb1bf00918
commit 3d141a2f4a
2 changed files with 0 additions and 20 deletions

View File

@@ -37,22 +37,6 @@ namespace bx
va_end(argList);
}
template <typename Ty>
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();

View File

@@ -310,10 +310,6 @@ namespace bx
template <typename Ty>
void stringPrintf(Ty& _out, const char* _format, ...);
/// Replace all instances of substring.
template <typename Ty>
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);