Ejemplo n.º 1
0
        /**
         * Converts to a string builder
         */
        public override StringValue ToStringBuilder()
        {
            UnicodeBuilderValue sb = new UnicodeBuilderValue();

            sb.append(this);

            return(sb);
        }
        /**
         * Returns a subsequence
         */
        public override CharSequence subSequence(int start, int end)
        {
            int len = end - start;

            if (len == 0)
            {
                return(EMPTY);
            }

            UnicodeBuilderValue sb = new UnicodeBuilderValue(len);

            sb.append(_buffer, start, len);

            return(sb);
        }
        /**
         * Append to a string builder.
         */
        public StringValue appendTo(UnicodeBuilderValue sb)
        {
            if (length() == 0)
            {
                return(sb);
            }

            Env env = Env.getInstance();

            try {
                Reader reader = env.getRuntimeEncodingFactory().create(toInputStream());

                if (reader != null)
                {
                    sb.append(reader);

                    reader.close();
                }

                return(sb);
            } catch (IOException e) {
                throw new QuercusRuntimeException(e);
            }
        }
        /**
         * Append to a string builder.
         */
        public override StringValue appendTo(UnicodeBuilderValue sb)
        {
            sb.append(_buffer, 0, _length);

            return(sb);
        }
Ejemplo n.º 5
0
 /**
  * Append to a unicode builder.
  */
 public override StringValue appendTo(UnicodeBuilderValue sb)
 {
     return(sb.append(_value));
 }
Ejemplo n.º 6
0
 /**
  * Append to a string builder.
  */
 public override StringValue appendTo(UnicodeBuilderValue sb)
 {
     return(sb.append(ToString(Env.getInstance())));
 }