Changeset 2240 for trunk/src/lol/base/string.h
- Timestamp:
- Jan 21, 2013, 2:11:48 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lol/base/string.h
r2235 r2240 38 38 : Super() 39 39 { 40 do 41 { 42 Push(*str); 43 } 44 while (*str++); 40 Resize((int)strlen(str)); 41 memcpy(&(*this)[0], str, Count() + 1); 42 } 43 44 inline String(char const *str, int count) 45 : Super() 46 { 47 Resize(count + 1); 48 memcpy(&(*this)[0], str, Count()); 49 ((Super &)*this).Last() = '\0'; 45 50 } 46 51 … … 58 63 { 59 64 return ((Super const &)*this)[n]; 65 } 66 67 inline char &Last() 68 { 69 return (*this)[Count() - 1]; 70 } 71 72 inline char const &Last() const 73 { 74 return (*this)[Count() - 1]; 60 75 } 61 76
Note: See TracChangeset
for help on using the changeset viewer.