Example #1
0
 @Override
 public void copyTo(StringValue target) {
   target.len = this.len;
   target.hashCode = this.hashCode;
   target.ensureSize(this.len);
   System.arraycopy(this.value, 0, target.value, 0, this.len);
 }
Example #2
0
 /*
  * (non-Javadoc)
  * @see java.lang.Appendable#append(java.lang.CharSequence)
  */
 public Appendable append(StringValue csq) {
   append(csq, 0, csq.length());
   return this;
 }
Example #3
0
 /**
  * Copies a substring of this string into the given target StringValue. The substring begins at
  * the given <code>start</code> index and ends at <code>end - 1</code>.
  *
  * @param target The StringValue object to copy the substring to.
  * @param start The beginning index, inclusive.
  * @param end The ending index, exclusive.
  * @exception IndexOutOfBoundsException Thrown, if the start is negative, or the end is larger
  *     than the length.
  */
 public void substring(StringValue target, int start, int end) {
   target.setValue(this, start, end - start);
 }