Changeset 955 for cpp/frams/util/sstring-simple.h
- Timestamp:
- 06/25/20 00:34:29 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/util/sstring-simple.h
r793 r955 27 27 SString(); ///< make an empty string 28 28 SString(const char*t, int t_len = -1); ///< make a string from char* 29 SString(int x) ; ///< string with initial buffer allocated for x characters29 SString(int x) = delete; ///< disallow the former 'int' constructor (so the new 'char' version is not used through implicit conversion) 30 30 SString(const SString& from); ///< duplicate string 31 31 SString(SString&& from);///< move 32 SString(char in); 32 33 ~SString(); 33 34 34 35 void copyFrom(const char* ch, int chlen = -1); ///< copy string, length of -1 == unknown 35 36 36 37 void* operator new(size_t s, void* mem){ return mem; } 37 38 #ifdef _MSC_VER … … 43 44 int len() const { return used; } ///< get string length 44 45 void shrink(); ///< free unnecessary buffer 46 void reserve(int needed) { ensureSize(needed); } ///< like in std::string 45 47 46 48 /// after this call, you can modify sstring directly.
Note: See TracChangeset
for help on using the changeset viewer.