code: public StrBuilder trim() {
          if (size == 0) {
              return this;
          }
          int len = size;
          final char[] buf = buffer;
          int pos = 0;
          while (pos < len && buf[pos] <= ' ') {
              pos++;
          }
          while (pos < len && buf[len - 1] <= ' ') {
              len--;
          }
          if (len < size) {
              delete(len, size);
          }
          if (pos > 0) {
              delete(0, pos);
          }
          return this;
      }
docs: Trims the builder by removing characters less than or equal to a space
  from the beginning and end.
  
  @return this, to enable chaining