function String_Class() {
  this.slice = function (str, start, end) {
    var end = end || str.length;
    return str.slice(start, end)
  }
  this.substr = function (str, start, end) {
    var end = end || str.length;
    return str.substr(start, end)
  }
  this.getmid = function (str, lstr, rstr, start, mode) {
    // '1 不区分大小写
    // '2 先查右再左
    // '4 后往前查
    var mode = mode || 0;
    var start = start || 0;
    if (mode & 1) {
      var mlstr = lstr.toLowerCase();
      var mrstr = rstr.toLowerCase();
      var mstr = str.toLowerCase();
    } else{
      var mstr = str;
      var mlstr = lstr;
      var mrstr = rstr;
    }
    if (start < 0) start = start + mstr.length + 1;
    if (mode & 2) {
      var r = mode & 6 ? mstr.lastIndexOf(mrstr, start) : mstr.indexOf(mrstr, start);
      if (r == -1) return;
      var l = mstr.lastIndexOf(mlstr, r - 1);
      if (l == -1) return;
    } else {
      var l = mode & 4 ? mstr.lastIndexOf(mlstr, start) : mstr.indexOf(mlstr, start);
      if (l == -1) return;
      l += mlstr.length
      var r = mstr.indexOf(mrstr, l);
      if (r == -1) return;
    }
    return str.slice(l,r)
  }
}