+ typedef const char* const_iterator;
+ typedef int size_type;
+ static size_type npos;
+ const char* begin(void) const {
+ return s;
+ }
+ const char* end(void) const {
+ return &s[ssize];
+ }
+ size_type size(void) const {
+ if (s)
+ return ssize;
+ else
+ return 0;
+ }
+ SString &assign(const char* sother, int size_ = -1) {
+ char *t = s;
+ s = StringDup(sother,size_);
+ ssize = (s) ? strlen(s) : 0;
+ delete []t;
+ return *this;
+ }
+ SString &assign(const SString& sother, int size_ = -1) {
+ return assign(sother.s,size_);
+ }
+ SString &assign(const_iterator ibeg, const_iterator iend) {
+ return assign(ibeg,iend - ibeg);
+ }