Wrapper of {@link String#substring(int, int)}

@param beginIndex begin index
@param endIndex end index
@return a String instance that is equivalent to sub part of this FastStr
173785
@Override
    public String substring(int beginIndex, int endIndex) {
        if (beginIndex < 0) {
            throw new StringIndexOutOfBoundsException(beginIndex);
        }
        char[] buf = this.buf;
        int sz = buf.length;
        if (endIndex > sz) {
            throw new StringIndexOutOfBoundsException(endIndex);
        }
        int subLen = endIndex - beginIndex;
        if (subLen < 0) {
            throw new StringIndexOutOfBoundsException(subLen);
        }
        return ((beginIndex == 0) && (endIndex == sz)) ? toString()
                : new String(buf, toInternalId(beginIndex), subLen);
    }
374260
public static String[] subarrayOf
            (final String[] array,
             final int start,
             final int end)
        {
        final int subarraySize = end - start;
        final String[] subarray = new String[subarraySize];

        for (int i = 0; i < subarraySize; ++i)
            {
            subarray[i] = array[i + start];
            }

        return (subarray);
        }
994121
public static boolean isNumeric(String str, int beginIndex, int endIndex)
    {
        for ( int i = beginIndex; i < endIndex; i++ ) {
            char chr = str.charAt(i);
            if ( ! StringUtil.isEnNumeric(chr) ) {
                return false;
            }
        }

        return true;
    }
496366
public Bytes subSequence(int start, int end) {
    if (start > end || start < 0 || end > length) {
      throw new IndexOutOfBoundsException("Bad start and/end start = " + start + " end=" + end
          + " offset=" + offset + " length=" + length);
    }
    return new Bytes(data, offset + start, end - start);
  }
80868
public static int count(final String string, final String substring)
   {
      int count = 0;
      int idx = 0;

      while ((idx = string.indexOf(substring, idx)) != -1)
      {
         idx++;
         count++;
      }

      return count;
   }
1076132
public static String insert(final String value, final String substr, final int index) {
        validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
        validate(substr, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
        if (index > value.length()) {
            return value;
        }
        return append(value.substring(0, index), substr, value.substring(index));
    }
703147
public String convertIndexToDisStr(int index)
    {
        if (this.getNextConverter() != null)
            return this.getNextConverter().convertIndexToDisStr(index);   // By default, use the same string
        else
            return super.convertIndexToDisStr(index);
    }
1260603
public final T substr(int beginIndex) {
        if (beginIndex < 0) {
            throw new StringIndexOutOfBoundsException(beginIndex);
        }
        return (beginIndex == 0) ? me() : substr(beginIndex, size());
    }
208239
public function substring(int $begin, int $end = null): self
    {
        return $this->substr($begin, $end ? $end - $begin + 1 : null);
    }
704162
async def substr(self, name, start, end=-1):
        
        return await self.execute_command('SUBSTR', name, start, end)
1259119
public static final char parseChar(CharSequence cs, int beginIndex, int endIndex)
    {
        if (endIndex - beginIndex != 1)
        {
            throw new IllegalArgumentException("input length must be 1");
        }
        return cs.charAt(beginIndex);
    }
419149
public static String rearstring(final String str, final int reverseIndex) {
        assertStringNotNull(str);
        if (str.length() < reverseIndex) {
            String msg = "The length of the string was smaller than the index:";
            msg = msg + " str=" + str + " reverseIndex=" + reverseIndex;
            throw new StringIndexOutOfBoundsException(msg);
        }
        return str.substring(str.length() - reverseIndex);
    }
567548
function substr(val, start, length){
  utils.assertString(val, 'val');
  utils.assertType(start, 'unit', 'start');
  length = length && length.val;
  var res = val.string.substr(start.val, length);
  return val instanceof nodes.Ident
      ? new nodes.Ident(res)
      : new nodes.String(res);
}
768520
public UTF8String substring(final int start, final int until) {
    if (until <= start || start >= numBytes) {
      return EMPTY_UTF8;
    }

    int i = 0;
    int c = 0;
    while (i < numBytes && c < start) {
      i += numBytesForFirstByte(getByte(i));
      c += 1;
    }

    int j = i;
    while (i < numBytes && c < until) {
      i += numBytesForFirstByte(getByte(i));
      c += 1;
    }

    if (i > j) {
      byte[] bytes = new byte[i - j];
      copyMemory(base, offset + j, bytes, BYTE_ARRAY_OFFSET, i - j);
      return fromBytes(bytes);
    } else {
      return EMPTY_UTF8;
    }
  }
1292120
private static boolean substringStartsWith(String string, int offset, String substring) {
    return string.regionMatches(offset, substring, 0, substring.length());
  }
873012
static public byte[] byteSubstring(byte[] bytes, int start, int end) {

        byte[] rc = null;

        if (0 > start || start > bytes.length || start > end) {
            // invalid start position
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Invalid start position in byteSubstring: " + start);
            }
        } else if (0 > end || end > bytes.length) {
            // invalid end position
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Invalid end position in byteSubstring: " + end);
            }
        } else {
            // now pull the substring
            int len = end - start;
            rc = new byte[len];
            System.arraycopy(bytes, start, rc, 0, len);
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "byteSubstring returning: [" + getEnglishString(rc) + "]");
        }
        return rc;
    }
701416
public String convertIndexToString(int index)
    {
        String[][] rgstring = this.getPopupMap();
        if (index >= rgstring.length)
            index = 0;
        return rgstring[index][0];
    }