diff --git a/include/bx/inline/string.inl b/include/bx/inline/string.inl index 61c4933..ebd6144 100644 --- a/include/bx/inline/string.inl +++ b/include/bx/inline/string.inl @@ -225,6 +225,12 @@ namespace bx } } + template + inline void StringT::append(const char* _ptr, const char* _term) + { + append(StringView(_ptr, _term) ); + } + template inline void StringT::clear() { @@ -236,6 +242,12 @@ namespace bx } } + template + inline const char* StringT::getCPtr() const + { + return getPtr(); + } + inline StringView strSubstr(const StringView& _str, int32_t _start, int32_t _len) { return StringView(_str, _start, _len); diff --git a/include/bx/string.h b/include/bx/string.h index 43798a4..f35faac 100644 --- a/include/bx/string.h +++ b/include/bx/string.h @@ -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.