Changeset 2235


Ignore:
Timestamp:
Jan 21, 2013, 12:28:12 AM (7 years ago)
Author:
sam
Message:

base: implement String::Resize().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lol/base/string.h

    r2216 r2235  
    6565    }
    6666
     67    void Resize(int count)
     68    {
     69        ((Super &)*this).Resize(count + 1);
     70        ((Super &)*this).Last() = '\0';
     71    }
     72
    6773    inline String operator +(String const &s) const
    6874    {
     
    7379    inline String& operator +=(String const &s)
    7480    {
    75         /* Be careful, we have a trailing zero we don't want! */
     81        /* Ignore the trailing zero we don't want */
    7682        --m_count;
    7783        (Super &)*this += (Super const &)s;
Note: See TracChangeset for help on using the changeset viewer.