code: public boolean startsWith(XMLString prefix, int toffset)
    {
  
      FastStringBuffer fsb = fsb();
      int to = m_start + toffset;
      int tlim = m_start + m_length;
      int po = 0;
      int pc = prefix.length();
  
      // Note: toffset might be near -1>>>1.
      if ((toffset < 0) || (toffset > m_length - pc))
      {
        return false;
      }
  
      while (--pc >= 0)
      {
        if (fsb.charAt(to) != prefix.charAt(po))
        {
          return false;
        }
  
        to++;
        po++;
      }
  
      return true;
    }
docs: Tests if this string starts with the specified prefix beginning
  a specified index.
  
  @param   prefix    the prefix.
  @param   toffset   where to begin looking in the string.
  @return  <code>true</code> if the character sequence represented by the
  argument is a prefix of the substring of this object starting
  at index <code>toffset</code>; <code>false</code> otherwise.
  The result is <code>false</code> if <code>toffset</code> is
  negative or greater than the length of this
  <code>String</code> object; otherwise the result is the same
  as the result of the expression
  <pre>
  this.subString(toffset).startsWith(prefix)
  </pre>
  @exception java.lang.NullPointerException if <code>prefix</code> is
  <code>null</code>.