1 #include "mystring.h"
2 #include <ctype.h>
3 
rstrip() const4 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 }
11