lib/mystring/rstrip.cc
changeset 0 6f7a81934006
equal deleted inserted replaced
-1:000000000000 0:6f7a81934006
       
     1 #include "mystring.h"
       
     2 #include <ctype.h>
       
     3 
       
     4 mystring mystring::rstrip() const
       
     5 {
       
     6   const char* ptr = rep->buf + rep->length - 1;
       
     7   while(ptr >= rep->buf && isspace(*ptr))
       
     8     --ptr;
       
     9   return mystring(rep->buf, ptr-rep->buf+1);
       
    10 }