Logo Search packages:      
Sourcecode: icu version File versions  Download package

void StringPiece::remove_suffix ( int32_t  n  )  [inline]

Removes the last n string units.

Parameters:
n suffix length, must be non-negative and <=length() ICU 4.2

Definition at line 172 of file stringpiece.h.

                                {
    if (n >= 0) {
      if (n <= length_) {
        length_ -= n;
      } else {
        length_ = 0;
      }
    }
  }


Generated by  Doxygen 1.6.0   Back to index