mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Cleanup.
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user