mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
String: Added STL compatible append. Added getCPtr().
This commit is contained in:
@@ -225,6 +225,12 @@ namespace bx
|
||||
}
|
||||
}
|
||||
|
||||
template<bx::AllocatorI** AllocatorT>
|
||||
inline void StringT<AllocatorT>::append(const char* _ptr, const char* _term)
|
||||
{
|
||||
append(StringView(_ptr, _term) );
|
||||
}
|
||||
|
||||
template<bx::AllocatorI** AllocatorT>
|
||||
inline void StringT<AllocatorT>::clear()
|
||||
{
|
||||
@@ -236,6 +242,12 @@ namespace bx
|
||||
}
|
||||
}
|
||||
|
||||
template<bx::AllocatorI** AllocatorT>
|
||||
inline const char* StringT<AllocatorT>::getCPtr() const
|
||||
{
|
||||
return getPtr();
|
||||
}
|
||||
|
||||
inline StringView strSubstr(const StringView& _str, int32_t _start, int32_t _len)
|
||||
{
|
||||
return StringView(_str, _start, _len);
|
||||
|
||||
@@ -128,8 +128,15 @@ namespace bx
|
||||
///
|
||||
void append(const StringView& _str);
|
||||
|
||||
///
|
||||
void append(const char* _ptr, const char* _term);
|
||||
|
||||
///
|
||||
void clear();
|
||||
|
||||
/// Returns zero-terminated C string pointer.
|
||||
///
|
||||
const char* getCPtr() const;
|
||||
};
|
||||
|
||||
/// Retruns true if character is part of space set.
|
||||
|
||||
Reference in New Issue
Block a user