org.jruby
Class RubyString

java.lang.Object
  extended by org.jruby.RubyBasicObject
      extended by org.jruby.RubyObject
          extended by org.jruby.RubyString
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<IRubyObject>, InstanceVariables, InternalVariables, IRubyObject, EncodingCapable, CoreObjectType

public class RubyString
extends RubyObject
implements EncodingCapable

Implementation of Ruby String class Concurrency: no synchronization is required among readers, but all users must synchronize externally with writers.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jruby.RubyObject
RubyObject.Data, RubyObject.ObjectMethods
 
Nested classes/interfaces inherited from class org.jruby.RubyBasicObject
RubyBasicObject.BasicObjectMethods, RubyBasicObject.Finalizer
 
Field Summary
 
Fields inherited from class org.jruby.RubyObject
OBJECT_ALLOCATOR
 
Fields inherited from class org.jruby.RubyBasicObject
ALL_F, COMPARE_BY_IDENTITY_F, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, metaClass, NEVER, NIL_F, TAINTED_F, UNDEF, UNTRUSTED_F, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F
 
Fields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY
 
Constructor Summary
  RubyString(Ruby runtime, RubyClass rubyClass, byte[] value)
           
  RubyString(Ruby runtime, RubyClass rubyClass, org.jruby.util.ByteList value)
           
  RubyString(Ruby runtime, RubyClass rubyClass, org.jruby.util.ByteList value, boolean objectSpace)
           
protected RubyString(Ruby runtime, RubyClass rubyClass, org.jruby.util.ByteList value, org.jcodings.Encoding enc)
           
protected RubyString(Ruby runtime, RubyClass rubyClass, org.jruby.util.ByteList value, org.jcodings.Encoding enc, int cr)
           
protected RubyString(Ruby runtime, RubyClass rubyClass, org.jruby.util.ByteList value, int cr)
           
  RubyString(Ruby runtime, RubyClass rubyClass, java.lang.CharSequence value)
           
 
Method Summary
 RubyString append(IRubyObject other)
          rb_str_append
 RubyString append19(IRubyObject other)
           
 IRubyObject ascii_only_p(ThreadContext context)
           
 java.lang.String asJavaString()
          rb_to_id
 void associateEncoding(org.jcodings.Encoding enc)
           
 RubyString asString()
          rb_obj_as_string First converts this object into a String using the "to_s" method, infects it with the current taint and returns it.
static java.lang.String byteListToString(org.jruby.util.ByteList bytes)
           
 IRubyObject bytes(ThreadContext context, Block block)
           
 RubyFixnum bytesize()
           
static java.lang.String bytesToString(byte[] bytes)
           
static java.lang.String bytesToString(byte[] bytes, int beg, int len)
           
 IRubyObject capitalize_bang(ThreadContext context)
           
 IRubyObject capitalize_bang19(ThreadContext context)
           
 IRubyObject capitalize(ThreadContext context)
          rb_str_capitalize / rb_str_capitalize_bang
 IRubyObject capitalize19(ThreadContext context)
           
 IRubyObject casecmp(ThreadContext context, IRubyObject other)
           
 IRubyObject casecmp19(ThreadContext context, IRubyObject other)
           
 RubyString cat(byte ch)
           
 RubyString cat(byte[] str)
           
 RubyString cat(byte[] str, int beg, int len)
           
 int cat(byte[] bytes, int p, int len, org.jcodings.Encoding enc)
           
 int cat(byte[] bytes, int p, int len, org.jcodings.Encoding enc, int cr, int cr2)
           
 RubyString cat(org.jruby.util.ByteList str)
           
 RubyString cat(int ch)
           
 RubyString cat(int code, org.jcodings.Encoding enc)
           
 RubyString cat19(RubyString str)
           
 RubyString catAscii(byte[] bytes, int p, int len)
           
 IRubyObject center(IRubyObject arg0)
          rb_str_center
 IRubyObject center(IRubyObject[] args)
          Deprecated. 
 IRubyObject center(IRubyObject arg0, IRubyObject arg1)
           
 IRubyObject center19(IRubyObject arg0)
           
 IRubyObject center19(IRubyObject arg0, IRubyObject arg1)
           
 IRubyObject chars18(ThreadContext context, Block block)
           
 IRubyObject chars19(ThreadContext context, Block block)
           
 IRubyObject checkStringType()
          rb_check_string_type Tries to return a coerced string representation of this object, using "to_str".
 IRubyObject chomp_bang(IRubyObject[] args)
          Deprecated. 
 IRubyObject chomp_bang(ThreadContext context)
          rb_str_chomp_bang In the common case, removes CR and LF characters in various ways depending on the value of the optional args[0].
 IRubyObject chomp_bang(ThreadContext context, IRubyObject arg0)
           
 IRubyObject chomp_bang19(ThreadContext context)
           
 IRubyObject chomp_bang19(ThreadContext context, IRubyObject arg0)
           
 RubyString chomp(IRubyObject[] args)
          Deprecated. 
 RubyString chomp(ThreadContext context)
          rb_str_chop
 RubyString chomp(ThreadContext context, IRubyObject arg0)
           
 RubyString chomp19(ThreadContext context)
           
 RubyString chomp19(ThreadContext context, IRubyObject arg0)
           
 IRubyObject chop_bang(ThreadContext context)
           
 IRubyObject chop_bang19(ThreadContext context)
           
 IRubyObject chop(ThreadContext context)
          rb_str_chop / rb_str_chop_bang
 IRubyObject chop19(ThreadContext context)
           
 IRubyObject chr(ThreadContext context)
           
 RubyString clear()
           
 void clearCodeRange()
           
 IRubyObject codepoints(ThreadContext context, Block block)
           
 int compareTo(IRubyObject other)
           
 RubyString concat(IRubyObject other)
          rb_str_concat
 RubyString concat19(ThreadContext context, IRubyObject other)
           
 RubyString convertToString()
          Tries to convert this object to a Ruby String using the "to_str" method.
 IRubyObject count(ThreadContext context)
          rb_str_count
 IRubyObject count(ThreadContext context, IRubyObject arg)
           
 IRubyObject count(ThreadContext context, IRubyObject[] args)
           
 IRubyObject count19(ThreadContext context)
           
 IRubyObject count19(ThreadContext context, IRubyObject arg)
           
 IRubyObject count19(ThreadContext context, IRubyObject[] args)
           
static RubyClass createStringClass(Ruby runtime)
           
 RubyString crypt(ThreadContext context, IRubyObject other)
          rb_str_crypt
 IRubyObject delete_bang(ThreadContext context)
           
 IRubyObject delete_bang(ThreadContext context, IRubyObject arg)
           
 IRubyObject delete_bang(ThreadContext context, IRubyObject[] args)
           
 IRubyObject delete_bang19(ThreadContext context)
           
 IRubyObject delete_bang19(ThreadContext context, IRubyObject arg)
           
 IRubyObject delete_bang19(ThreadContext context, IRubyObject[] args)
           
 IRubyObject delete(ThreadContext context)
          rb_str_delete / rb_str_delete_bang
 IRubyObject delete(ThreadContext context, IRubyObject arg)
           
 IRubyObject delete(ThreadContext context, IRubyObject[] args)
           
 IRubyObject delete19(ThreadContext context)
           
 IRubyObject delete19(ThreadContext context, IRubyObject arg)
           
 IRubyObject delete19(ThreadContext context, IRubyObject[] args)
           
 IRubyObject doClone()
           
 IRubyObject downcase_bang(ThreadContext context)
           
 IRubyObject downcase_bang19(ThreadContext context)
           
 RubyString downcase(ThreadContext context)
          rb_str_downcase / rb_str_downcase_bang
 RubyString downcase19(ThreadContext context)
           
 IRubyObject dump()
          rb_str_dump
 IRubyObject dump19()
           
 RubyString each_byte(ThreadContext context, Block block)
          rb_str_each_byte
 IRubyObject each_byte19(ThreadContext context, Block block)
           
 IRubyObject each_char18(ThreadContext context, Block block)
          rb_str_each_char
 IRubyObject each_char19(ThreadContext context, Block block)
           
 IRubyObject each_codepoint(ThreadContext context, Block block)
          rb_str_each_codepoint
 IRubyObject each_line(ThreadContext context, Block block)
          rb_str_each_line
 IRubyObject each_line(ThreadContext context, IRubyObject arg, Block block)
           
 IRubyObject each_line18(ThreadContext context, Block block)
           
 IRubyObject each_line18(ThreadContext context, IRubyObject arg, Block block)
           
 IRubyObject each_line19(ThreadContext context, Block block)
           
 IRubyObject each_line19(ThreadContext context, IRubyObject arg, Block block)
           
 IRubyObject each_lineCommon(ThreadContext context, IRubyObject sep, Block block)
           
 IRubyObject each18(ThreadContext context, Block block)
           
 IRubyObject each18(ThreadContext context, IRubyObject arg, Block block)
           
 IRubyObject each19(ThreadContext context, Block block)
           
 IRubyObject each19(ThreadContext context, IRubyObject arg, Block block)
           
 RubyBoolean empty_p(ThreadContext context)
          rb_str_empty
 void empty()
           
 IRubyObject encode_bang(ThreadContext context, IRubyObject enc)
           
 IRubyObject encoding(ThreadContext context)
           
 IRubyObject end_with_p(ThreadContext context)
           
 IRubyObject end_with_p(ThreadContext context, IRubyObject arg)
           
 IRubyObject end_with_p(ThreadContext context, IRubyObject[] args)
           
 boolean eql(IRubyObject other)
          short circuit for String key comparison
 boolean equals(java.lang.Object other)
          This method is just a wrapper around the Ruby "==" method, provided so that RubyObjects can be used as keys in the Java HashMap object underlying RubyHash.
 IRubyObject force_encoding(ThreadContext context, IRubyObject enc)
           
 IRubyObject getbyte(ThreadContext context, IRubyObject index)
           
 org.jruby.util.ByteList getByteList()
           
 byte[] getBytes()
           
 int getCodeRange()
           
 org.jcodings.Encoding getEncoding()
           
 java.lang.Class getJavaClass()
          Will return the Java interface that most closely can represent this object, when working through JAva integration translations.
 int getNativeTypeIndex()
          This is overridden in the other concrete Java builtins to provide a fast way to determine what type they are.
 java.lang.String getUnicodeValue()
          used by ar-jdbc
 java.lang.CharSequence getValue()
           
 IRubyObject gsub_bang(ThreadContext context, IRubyObject[] args, Block block)
          Deprecated. 
 IRubyObject gsub_bang(ThreadContext context, IRubyObject arg0, Block block)
           
 IRubyObject gsub_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
           
 IRubyObject gsub_bang19(ThreadContext context, IRubyObject arg0, Block block)
           
 IRubyObject gsub_bang19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
           
 IRubyObject gsub(ThreadContext context, IRubyObject[] args, Block block)
          Deprecated. 
 IRubyObject gsub(ThreadContext context, IRubyObject arg0, Block block)
          rb_str_gsub / rb_str_gsub_bang
 IRubyObject gsub(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
           
 IRubyObject gsub19(ThreadContext context, IRubyObject arg0, Block block)
           
 IRubyObject gsub19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
           
 RubyFixnum hash()
          rb_obj_id Will return the hash code of this object.
 int hashCode()
          Override the Object#hashCode method to make sure that the Ruby hash is actually used as the hashcode for Ruby objects.
 IRubyObject hex(ThreadContext context)
          rb_str_hex
 IRubyObject hex19(ThreadContext context)
           
 RubyBoolean include_p(ThreadContext context, IRubyObject obj)
          rb_str_include
 RubyBoolean include_p19(ThreadContext context, IRubyObject obj)
           
 IRubyObject index(ThreadContext context, IRubyObject arg0)
          rb_str_index_m
 IRubyObject index(ThreadContext context, IRubyObject[] args)
          Deprecated. 
 IRubyObject index(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
           
 IRubyObject index19(ThreadContext context, IRubyObject arg0)
           
 IRubyObject index19(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
           
 IRubyObject initialize()
          rb_obj_dummy Default initialize method.
 IRubyObject initialize(IRubyObject arg0)
           
 IRubyObject initialize(IRubyObject[] args, Block unusedBlock)
          Deprecated. Use the versions with zero or one arguments
 IRubyObject insert(ThreadContext context, IRubyObject indexArg, IRubyObject stringArg)
           
 IRubyObject insert19(ThreadContext context, IRubyObject indexArg, IRubyObject stringArg)
           
 IRubyObject inspect()
          rb_str_inspect
 IRubyObject inspect19()
           
 RubySymbol intern()
           
 RubySymbol intern19()
           
 boolean isAsciiOnly()
           
 boolean isCodeRangeAsciiOnly()
           
 boolean isCodeRangeBroken()
           
 boolean isCodeRangeValid()
           
 boolean isEmpty()
           
 boolean isEVStr(int c)
           
 RubyFixnum length()
          rb_str_length
 RubyFixnum length19()
           
 IRubyObject lines(ThreadContext context, Block block)
           
 IRubyObject lines(ThreadContext context, IRubyObject arg, Block block)
           
 IRubyObject lines18(ThreadContext context, Block block)
           
 IRubyObject lines18(ThreadContext context, IRubyObject arg, Block block)
           
 IRubyObject ljust(IRubyObject arg0)
          rb_str_ljust
 IRubyObject ljust(IRubyObject[] args)
          Deprecated. 
 IRubyObject ljust(IRubyObject arg0, IRubyObject arg1)
           
 IRubyObject ljust19(IRubyObject arg0)
           
 IRubyObject ljust19(IRubyObject arg0, IRubyObject arg1)
           
 IRubyObject lstrip_bang(ThreadContext context)
           
 IRubyObject lstrip_bang19(ThreadContext context)
           
 IRubyObject lstrip(ThreadContext context)
          rb_str_lstrip / rb_str_lstrip_bang
 IRubyObject lstrip19(ThreadContext context)
           
 RubyString makeShared(Ruby runtime, int index, int len)
           
 RubyString makeShared19(Ruby runtime, int index, int len)
           
 IRubyObject match(ThreadContext context, IRubyObject pattern)
          String#match(pattern) rb_str_match_m
 IRubyObject match19(ThreadContext context, IRubyObject[] args, Block block)
           
 IRubyObject match19(ThreadContext context, IRubyObject pattern, Block block)
           
 void modify()
          rb_str_modify
 void modify(int length)
          rb_str_modify (with length bytes ensured)
 void modify19()
           
 void modify19(int length)
           
static RubyString newEmptyString(Ruby runtime)
           
static RubyString newEmptyString(Ruby runtime, org.jcodings.Encoding enc)
           
static RubyString newEmptyString(Ruby runtime, RubyClass metaClass)
           
static RubyString newEmptyString(Ruby runtime, RubyClass metaClass, org.jcodings.Encoding enc)
           
static RubyString newInstance(IRubyObject recv, IRubyObject[] args, Block block)
          rb_str_s_new
 RubyString newString(org.jruby.util.ByteList s)
          Deprecated.  
 RubyString newString(java.lang.CharSequence s)
          Deprecated.  
static RubyString newString(Ruby runtime, byte[] bytes)
           
static RubyString newString(Ruby runtime, byte[] bytes, int start, int length)
           
static RubyString newString(Ruby runtime, org.jruby.util.ByteList bytes)
           
static RubyString newString(Ruby runtime, java.lang.CharSequence str)
           
static RubyString newString(Ruby runtime, RubyClass clazz, java.lang.CharSequence str)
          Deprecated. 
static RubyString newString(Ruby runtime, java.lang.String str)
           
static RubyString newStringLight(Ruby runtime, org.jruby.util.ByteList bytes)
           
static RubyString newStringLight(Ruby runtime, int size)
           
static RubyString newStringNoCopy(Ruby runtime, byte[] bytes)
           
static RubyString newStringNoCopy(Ruby runtime, byte[] bytes, int start, int length)
           
static RubyString newStringNoCopy(Ruby runtime, org.jruby.util.ByteList bytes)
           
static RubyString newStringNoCopy(Ruby runtime, org.jruby.util.ByteList bytes, org.jcodings.Encoding enc, int cr)
           
static RubyString newStringNoCopy(Ruby runtime, RubyClass clazz, org.jruby.util.ByteList bytes)
           
static RubyString newStringNoCopy(Ruby runtime, RubyClass clazz, org.jruby.util.ByteList bytes, org.jcodings.Encoding enc, int cr)
           
static RubyString newStringShared(Ruby runtime, byte[] bytes)
           
static RubyString newStringShared(Ruby runtime, byte[] bytes, int start, int length)
           
static RubyString newStringShared(Ruby runtime, org.jruby.util.ByteList bytes)
           
static RubyString newStringShared(Ruby runtime, RubyClass clazz, org.jruby.util.ByteList bytes)
           
static RubyString newStringShared(Ruby runtime, RubyString orig)
           
static RubyString newUnicodeString(Ruby runtime, java.lang.String str)
           
static RubyString newUsAsciiStringNoCopy(Ruby runtime, org.jruby.util.ByteList bytes)
           
static RubyString newUsAsciiStringShared(Ruby runtime, byte[] bytes, int start, int length)
           
static RubyString newUsAsciiStringShared(Ruby runtime, org.jruby.util.ByteList bytes)
           
static RubyString objAsString(ThreadContext context, IRubyObject obj)
          rb_obj_as_string
 IRubyObject oct(ThreadContext context)
          rb_str_oct
 IRubyObject oct19(ThreadContext context)
           
 IRubyObject op_aref(ThreadContext context, IRubyObject arg)
           
 IRubyObject op_aref(ThreadContext context, IRubyObject[] args)
          Deprecated. 
 IRubyObject op_aref(ThreadContext context, IRubyObject arg1, IRubyObject arg2)
          rb_str_aref, rb_str_aref_m
 IRubyObject op_aref19(ThreadContext context, IRubyObject arg)
           
 IRubyObject op_aref19(ThreadContext context, IRubyObject arg1, IRubyObject arg2)
           
 IRubyObject op_aset(ThreadContext context, IRubyObject[] args)
          Deprecated. 
 IRubyObject op_aset(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
          rb_str_aset, rb_str_aset_m
 IRubyObject op_aset(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)
           
 IRubyObject op_aset19(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
           
 IRubyObject op_aset19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)
           
 int op_cmp(RubyString other)
          rb_str_cmp
 IRubyObject op_cmp(ThreadContext context, IRubyObject other)
           
 int op_cmp19(RubyString other)
           
 IRubyObject op_cmp19(ThreadContext context, IRubyObject other)
           
 IRubyObject op_equal(ThreadContext context, IRubyObject other)
          rb_str_equal
 IRubyObject op_equal19(ThreadContext context, IRubyObject other)
           
 IRubyObject op_format(ThreadContext context, IRubyObject arg)
           
 IRubyObject op_ge(ThreadContext context, IRubyObject other)
           
 IRubyObject op_ge19(ThreadContext context, IRubyObject other)
           
 IRubyObject op_gt(ThreadContext context, IRubyObject other)
           
 IRubyObject op_gt19(ThreadContext context, IRubyObject other)
           
 IRubyObject op_le(ThreadContext context, IRubyObject other)
           
 IRubyObject op_le19(ThreadContext context, IRubyObject other)
           
 IRubyObject op_lt(ThreadContext context, IRubyObject other)
           
 IRubyObject op_lt19(ThreadContext context, IRubyObject other)
           
 IRubyObject op_match(ThreadContext context, IRubyObject other)
          rb_str_match
 IRubyObject op_match19(ThreadContext context, IRubyObject other)
           
 IRubyObject op_mul(ThreadContext context, IRubyObject other)
           
 IRubyObject op_mul19(ThreadContext context, IRubyObject other)
           
 IRubyObject op_plus(ThreadContext context, IRubyObject other)
           
 IRubyObject op_plus(ThreadContext context, RubyString str)
           
 IRubyObject op_plus19(ThreadContext context, IRubyObject other)
           
 IRubyObject op_plus19(ThreadContext context, RubyString str)
           
 IRubyObject ord(ThreadContext context)
           
 IRubyObject partition(ThreadContext context, Block block)
           
 IRubyObject partition(ThreadContext context, IRubyObject arg, Block block)
           
 IRubyObject replace(IRubyObject other)
          rb_str_replace_m
 RubyString replace19(IRubyObject other)
           
 RubyString reverse_bang(ThreadContext context)
           
 RubyString reverse_bang19(ThreadContext context)
           
 IRubyObject reverse(ThreadContext context)
           
 IRubyObject reverse19(ThreadContext context)
           
 IRubyObject rindex(ThreadContext context, IRubyObject arg0)
          rb_str_rindex_m
 IRubyObject rindex(ThreadContext context, IRubyObject[] args)
          Deprecated. 
 IRubyObject rindex(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
           
 IRubyObject rindex19(ThreadContext context, IRubyObject arg0)
           
 IRubyObject rindex19(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
           
 IRubyObject rjust(IRubyObject arg0)
          rb_str_rjust
 IRubyObject rjust(IRubyObject[] args)
          Deprecated. 
 IRubyObject rjust(IRubyObject arg0, IRubyObject arg1)
           
 IRubyObject rjust19(IRubyObject arg0)
           
 IRubyObject rjust19(IRubyObject arg0, IRubyObject arg1)
           
 IRubyObject rpartition(ThreadContext context, IRubyObject arg)
           
 IRubyObject rstrip_bang(ThreadContext context)
           
 IRubyObject rstrip_bang19(ThreadContext context)
           
 IRubyObject rstrip(ThreadContext context)
          rb_str_rstrip / rb_str_rstrip_bang
 IRubyObject rstrip19(ThreadContext context)
           
 IRubyObject scan(ThreadContext context, IRubyObject arg, Block block)
          rb_str_scan
 IRubyObject scan19(ThreadContext context, IRubyObject arg, Block block)
           
 IRubyObject setbyte(ThreadContext context, IRubyObject index, IRubyObject val)
           
 void setCodeRange(int codeRange)
           
 void setEncodingAndCodeRange(org.jcodings.Encoding enc, int cr)
           
 void setValue(org.jruby.util.ByteList value)
           
 void setValue(java.lang.CharSequence value)
          Deprecated.  
 IRubyObject slice_bang(ThreadContext context, IRubyObject arg0)
          rb_str_slice_bang
 IRubyObject slice_bang(ThreadContext context, IRubyObject[] args)
          Deprecated. 
 IRubyObject slice_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
           
 IRubyObject slice_bang19(ThreadContext context, IRubyObject arg0)
           
 IRubyObject slice_bang19(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
           
 RubyArray split(ThreadContext context)
          rb_str_split_m
 RubyArray split(ThreadContext context, IRubyObject arg0)
           
 RubyArray split(ThreadContext context, IRubyObject[] args)
          Deprecated. 
 RubyArray split(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
           
 RubyArray split19(ThreadContext context)
           
 RubyArray split19(ThreadContext context, IRubyObject arg0)
           
 RubyArray split19(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
           
 IRubyObject squeeze_bang(ThreadContext context)
           
 IRubyObject squeeze_bang(ThreadContext context, IRubyObject arg)
           
 IRubyObject squeeze_bang(ThreadContext context, IRubyObject[] args)
           
 IRubyObject squeeze_bang19(ThreadContext context)
           
 IRubyObject squeeze_bang19(ThreadContext context, IRubyObject arg)
           
 IRubyObject squeeze_bang19(ThreadContext context, IRubyObject[] args)
           
 IRubyObject squeeze(ThreadContext context)
          rb_str_squeeze / rb_str_squeeze_bang
 IRubyObject squeeze(ThreadContext context, IRubyObject arg)
           
 IRubyObject squeeze(ThreadContext context, IRubyObject[] args)
           
 IRubyObject squeeze19(ThreadContext context)
           
 IRubyObject squeeze19(ThreadContext context, IRubyObject arg)
           
 IRubyObject squeeze19(ThreadContext context, IRubyObject[] args)
           
 IRubyObject start_with_p(ThreadContext context)
           
 IRubyObject start_with_p(ThreadContext context, IRubyObject arg)
           
 IRubyObject start_with_p(ThreadContext context, IRubyObject[] args)
           
 IRubyObject str_eql_p(ThreadContext context, IRubyObject other)
           
 IRubyObject str_eql_p19(ThreadContext context, IRubyObject other)
           
 RubyString strDup()
          Deprecated. 
 RubyString strDup(Ruby runtime)
           
static byte[] stringToBytes(java.lang.String string)
           
 double stringToDouble(boolean badcheck)
          rb_str_to_dbl
 IRubyObject stringToInum(int base, boolean badcheck)
          rb_str_to_inum
static RubyString stringValue(IRubyObject object)
           
 IRubyObject strip_bang(ThreadContext context)
           
 IRubyObject strip_bang19(ThreadContext context)
           
 IRubyObject strip(ThreadContext context)
          rb_str_strip / rb_str_strip_bang
 IRubyObject strip19(ThreadContext context)
           
 IRubyObject sub_bang(ThreadContext context, IRubyObject[] args, Block block)
          Deprecated. 
 IRubyObject sub_bang(ThreadContext context, IRubyObject arg0, Block block)
           
 IRubyObject sub_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
           
 IRubyObject sub_bang19(ThreadContext context, IRubyObject arg0, Block block)
           
 IRubyObject sub_bang19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
           
 IRubyObject sub(ThreadContext context, IRubyObject[] args, Block block)
          Deprecated. 
 IRubyObject sub(ThreadContext context, IRubyObject arg0, Block block)
          rb_str_sub / rb_str_sub_bang
 IRubyObject sub(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
           
 IRubyObject sub19(ThreadContext context, IRubyObject arg0, Block block)
           
 IRubyObject sub19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
           
 IRubyObject substr(int beg, int len)
          Deprecated. 
 IRubyObject substr(Ruby runtime, int beg, int len)
           
 IRubyObject substr19(Ruby runtime, int beg, int len)
           
 IRubyObject succ_bang()
           
 IRubyObject succ_bang19()
           
 IRubyObject succ(ThreadContext context)
           
 IRubyObject succ19(ThreadContext context)
           
 IRubyObject sum(ThreadContext context)
           
 IRubyObject sum(ThreadContext context, IRubyObject arg)
           
 IRubyObject sumCommon(ThreadContext context, long bits)
           
 IRubyObject swapcase_bang(ThreadContext context)
           
 IRubyObject swapcase_bang19(ThreadContext context)
           
 RubyString swapcase(ThreadContext context)
          rb_str_swapcase / rb_str_swapcase_bang
 RubyString swapcase19(ThreadContext context)
           
 IRubyObject to_c(ThreadContext context)
          string_to_c
 IRubyObject to_f()
          rb_str_to_f
 IRubyObject to_i()
          rb_str_to_i
 IRubyObject to_i(IRubyObject arg0)
          rb_str_to_i
 IRubyObject to_i(IRubyObject[] args)
          Deprecated. 
 IRubyObject to_java()
           
 IRubyObject to_r(ThreadContext context)
          string_to_r
 IRubyObject to_s()
          rb_any_to_s call-seq: obj.to_s => string Returns a string representing obj.
 org.jcodings.Encoding toEncoding(Ruby runtime)
           
 java.lang.Object toJava(java.lang.Class target)
          Convert the object to the specified Java class, if possible.
 java.lang.String toString()
          The default toString method is just a wrapper that calls the Ruby "to_s" method.
 IRubyObject tr_bang(ThreadContext context, IRubyObject src, IRubyObject repl)
           
 IRubyObject tr_bang19(ThreadContext context, IRubyObject src, IRubyObject repl)
           
 IRubyObject tr_s_bang(ThreadContext context, IRubyObject src, IRubyObject repl)
           
 IRubyObject tr_s_bang19(ThreadContext context, IRubyObject src, IRubyObject repl)
           
 IRubyObject tr_s(ThreadContext context, IRubyObject src, IRubyObject repl)
          rb_str_tr_s / rb_str_tr_s_bang
 IRubyObject tr_s19(ThreadContext context, IRubyObject src, IRubyObject repl)
           
 IRubyObject tr(ThreadContext context, IRubyObject src, IRubyObject repl)
          rb_str_tr / rb_str_tr_bang
 IRubyObject tr19(ThreadContext context, IRubyObject src, IRubyObject repl)
           
static IRubyObject try_convert(ThreadContext context, IRubyObject recv, IRubyObject str)
           
static RubyString unmarshalFrom(UnmarshalStream input)
           
 RubyArray unpack(IRubyObject obj)
           
 IRubyObject upcase_bang(ThreadContext context)
           
 IRubyObject upcase_bang19(ThreadContext context)
           
 RubyString upcase(ThreadContext context)
          rb_str_upcase / rb_str_upcase_bang
 RubyString upcase19(ThreadContext context)
           
 IRubyObject upto18(ThreadContext context, IRubyObject end, Block block)
          rb_str_upto_m
 IRubyObject upto18(ThreadContext context, IRubyObject end, IRubyObject excl, Block block)
           
 IRubyObject upto19(ThreadContext context, IRubyObject end, Block block)
           
 IRubyObject upto19(ThreadContext context, IRubyObject end, IRubyObject excl, Block block)
           
 IRubyObject valid_encoding_p(ThreadContext context)
           
 
Methods inherited from class org.jruby.RubyObject
as, attachToObjectSpace, callInit, checkFrozen, convertToType, createObjectClass, display, dup, eql_p, eqlInternal, equal_p, equalInternal, evalUnder, evalUnder, extend, freeze, frozen_p, id_deprecated, id, initialize_copy, instance_eval, instance_eval, instance_eval, instance_eval, instance_eval, instance_exec, instance_of_p, instance_variable_defined_p, instance_variable_get, instance_variable_set, instance_variables, kind_of_p, method, methods, methods, methods19, nil_p, op_eqq, op_not_match, private_methods, private_methods19, protected_methods, protected_methods19, public_methods, public_methods19, puts, rbClone, remove_instance_variable, respond_to_p, respond_to_p, send, send, send, send, send, singleton_methods, singleton_methods19, singletonMethods, specificEval, specificEval, specificEval, specificEval, specificEval, taint, tainted_p, to_a, trust, type_deprecated, type, untaint, untrust, untrusted_p, validateInstanceVariable
 
Methods inherited from class org.jruby.RubyBasicObject
addFinalizer, anyToString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToInteger, convertToInteger, copyInstanceVariablesInto, copySpecialInstanceVariables, createBasicObjectClass, dataGetStruct, dataGetStructChecked, dataWrapStruct, ensureInstanceVariablesSettable, fastGetInstanceVariable, fastGetInternalVariable, fastHasInstanceVariable, fastHasInternalVariable, fastSetInstanceVariable, fastSetInternalVariable, getFlag, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getMetaClass, getRuntime, getSingletonClass, getSingletonClassClone, getType, getVariable, getVariableCount, getVariableList, getVariableNameList, hasInstanceVariable, hasInternalVariable, hasVariables, infectBy, isClass, isFalse, isFrozen, isImmediate, isModule, isNil, isTaint, isTrue, isUntrusted, makeMetaClass, op_not_equal, op_not, removeFinalizers, removeInstanceVariable, removeInternalVariable, respondsTo, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setTaint, setUntrusted, setVariable, syncVariables, taint, testFrozen, testFrozen, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableGetSize, variableTableRemove, variableTableStore, variableTableSync
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RubyString

public RubyString(Ruby runtime,
                  RubyClass rubyClass,
                  java.lang.CharSequence value)

RubyString

public RubyString(Ruby runtime,
                  RubyClass rubyClass,
                  byte[] value)

RubyString

public RubyString(Ruby runtime,
                  RubyClass rubyClass,
                  org.jruby.util.ByteList value)

RubyString

public RubyString(Ruby runtime,
                  RubyClass rubyClass,
                  org.jruby.util.ByteList value,
                  boolean objectSpace)

RubyString

protected RubyString(Ruby runtime,
                     RubyClass rubyClass,
                     org.jruby.util.ByteList value,
                     org.jcodings.Encoding enc,
                     int cr)

RubyString

protected RubyString(Ruby runtime,
                     RubyClass rubyClass,
                     org.jruby.util.ByteList value,
                     org.jcodings.Encoding enc)

RubyString

protected RubyString(Ruby runtime,
                     RubyClass rubyClass,
                     org.jruby.util.ByteList value,
                     int cr)
Method Detail

createStringClass

public static RubyClass createStringClass(Ruby runtime)

getEncoding

public org.jcodings.Encoding getEncoding()
Specified by:
getEncoding in interface EncodingCapable

associateEncoding

public void associateEncoding(org.jcodings.Encoding enc)

setEncodingAndCodeRange

public final void setEncodingAndCodeRange(org.jcodings.Encoding enc,
                                          int cr)

toEncoding

public final org.jcodings.Encoding toEncoding(Ruby runtime)

getCodeRange

public final int getCodeRange()

setCodeRange

public final void setCodeRange(int codeRange)

clearCodeRange

public final void clearCodeRange()

isCodeRangeAsciiOnly

public final boolean isCodeRangeAsciiOnly()

isAsciiOnly

public final boolean isAsciiOnly()

isCodeRangeValid

public final boolean isCodeRangeValid()

isCodeRangeBroken

public final boolean isCodeRangeBroken()

eql

public final boolean eql(IRubyObject other)
short circuit for String key comparison

Specified by:
eql in interface IRubyObject
Overrides:
eql in class RubyBasicObject

newString

@Deprecated
public RubyString newString(java.lang.CharSequence s)
Deprecated. 

Create a new String which uses the same Ruby runtime and the same class like this String. This method should be used to satisfy RCR #38.


newString

@Deprecated
public RubyString newString(org.jruby.util.ByteList s)
Deprecated. 

Create a new String which uses the same Ruby runtime and the same class like this String. This method should be used to satisfy RCR #38.


newString

@Deprecated
public static RubyString newString(Ruby runtime,
                                              RubyClass clazz,
                                              java.lang.CharSequence str)
Deprecated. 


newStringLight

public static RubyString newStringLight(Ruby runtime,
                                        org.jruby.util.ByteList bytes)

newStringLight

public static RubyString newStringLight(Ruby runtime,
                                        int size)

newString

public static RubyString newString(Ruby runtime,
                                   java.lang.CharSequence str)

newString

public static RubyString newString(Ruby runtime,
                                   java.lang.String str)

newString

public static RubyString newString(Ruby runtime,
                                   byte[] bytes)

newString

public static RubyString newString(Ruby runtime,
                                   byte[] bytes,
                                   int start,
                                   int length)

newString

public static RubyString newString(Ruby runtime,
                                   org.jruby.util.ByteList bytes)

newUnicodeString

public static RubyString newUnicodeString(Ruby runtime,
                                          java.lang.String str)

newStringShared

public static RubyString newStringShared(Ruby runtime,
                                         RubyString orig)

newStringShared

public static RubyString newStringShared(Ruby runtime,
                                         org.jruby.util.ByteList bytes)

newStringShared

public static RubyString newStringShared(Ruby runtime,
                                         RubyClass clazz,
                                         org.jruby.util.ByteList bytes)

newStringShared

public static RubyString newStringShared(Ruby runtime,
                                         byte[] bytes)

newStringShared

public static RubyString newStringShared(Ruby runtime,
                                         byte[] bytes,
                                         int start,
                                         int length)

newEmptyString

public static RubyString newEmptyString(Ruby runtime)

newEmptyString

public static RubyString newEmptyString(Ruby runtime,
                                        RubyClass metaClass)

newStringNoCopy

public static RubyString newStringNoCopy(Ruby runtime,
                                         org.jruby.util.ByteList bytes)

newStringNoCopy

public static RubyString newStringNoCopy(Ruby runtime,
                                         RubyClass clazz,
                                         org.jruby.util.ByteList bytes)

newStringNoCopy

public static RubyString newStringNoCopy(Ruby runtime,
                                         byte[] bytes,
                                         int start,
                                         int length)

newStringNoCopy

public static RubyString newStringNoCopy(Ruby runtime,
                                         byte[] bytes)

newEmptyString

public static RubyString newEmptyString(Ruby runtime,
                                        RubyClass metaClass,
                                        org.jcodings.Encoding enc)

newEmptyString

public static RubyString newEmptyString(Ruby runtime,
                                        org.jcodings.Encoding enc)

newStringNoCopy

public static RubyString newStringNoCopy(Ruby runtime,
                                         RubyClass clazz,
                                         org.jruby.util.ByteList bytes,
                                         org.jcodings.Encoding enc,
                                         int cr)

newStringNoCopy

public static RubyString newStringNoCopy(Ruby runtime,
                                         org.jruby.util.ByteList bytes,
                                         org.jcodings.Encoding enc,
                                         int cr)

newUsAsciiStringNoCopy

public static RubyString newUsAsciiStringNoCopy(Ruby runtime,
                                                org.jruby.util.ByteList bytes)

newUsAsciiStringShared

public static RubyString newUsAsciiStringShared(Ruby runtime,
                                                org.jruby.util.ByteList bytes)

newUsAsciiStringShared

public static RubyString newUsAsciiStringShared(Ruby runtime,
                                                byte[] bytes,
                                                int start,
                                                int length)

getNativeTypeIndex

public int getNativeTypeIndex()
Description copied from class: RubyObject
This is overridden in the other concrete Java builtins to provide a fast way to determine what type they are. Will generally return a value from org.jruby.runtime.ClassIndex

Specified by:
getNativeTypeIndex in interface CoreObjectType
Overrides:
getNativeTypeIndex in class RubyObject
Returns:
the ClassIndex of the native type this object was constructed from
See Also:
org.jruby.runtime.ClassInde

getJavaClass

public java.lang.Class getJavaClass()
Description copied from class: RubyBasicObject
Will return the Java interface that most closely can represent this object, when working through JAva integration translations.

Specified by:
getJavaClass in interface IRubyObject
Overrides:
getJavaClass in class RubyBasicObject
Returns:
Class

convertToString

public RubyString convertToString()
Description copied from class: RubyBasicObject
Tries to convert this object to a Ruby String using the "to_str" method.

Specified by:
convertToString in interface IRubyObject
Overrides:
convertToString in class RubyBasicObject
Returns:

toString

public java.lang.String toString()
Description copied from class: RubyObject
The default toString method is just a wrapper that calls the Ruby "to_s" method.

Overrides:
toString in class RubyObject

strDup

@Deprecated
public final RubyString strDup()
Deprecated. 

rb_str_dup


strDup

public final RubyString strDup(Ruby runtime)

makeShared

public final RubyString makeShared(Ruby runtime,
                                   int index,
                                   int len)

makeShared19

public final RubyString makeShared19(Ruby runtime,
                                     int index,
                                     int len)

modify

public final void modify()
rb_str_modify


modify19

public final void modify19()

modify

public final void modify(int length)
rb_str_modify (with length bytes ensured)


modify19

public final void modify19(int length)

bytesToString

public static java.lang.String bytesToString(byte[] bytes,
                                             int beg,
                                             int len)

byteListToString

public static java.lang.String byteListToString(org.jruby.util.ByteList bytes)

bytesToString

public static java.lang.String bytesToString(byte[] bytes)

stringToBytes

public static byte[] stringToBytes(java.lang.String string)

asString

public RubyString asString()
Description copied from class: RubyBasicObject
rb_obj_as_string First converts this object into a String using the "to_s" method, infects it with the current taint and returns it. If to_s doesn't return a Ruby String, RubyBasicObject.anyToString() is used instead.

Specified by:
asString in interface IRubyObject
Overrides:
asString in class RubyBasicObject
Returns:

checkStringType

public IRubyObject checkStringType()
Description copied from class: RubyBasicObject
rb_check_string_type Tries to return a coerced string representation of this object, using "to_str". If that returns something other than a String or nil, an empty String will be returned.

Specified by:
checkStringType in interface IRubyObject
Overrides:
checkStringType in class RubyBasicObject
Returns:

try_convert

public static IRubyObject try_convert(ThreadContext context,
                                      IRubyObject recv,
                                      IRubyObject str)

to_s

public IRubyObject to_s()
Description copied from class: RubyObject
rb_any_to_s call-seq: obj.to_s => string Returns a string representing obj. The default to_s prints the object's class and an encoding of the object id. As a special case, the top-level object that is the initial execution context of Ruby programs returns ``main.''

Overrides:
to_s in class RubyObject

compareTo

public final int compareTo(IRubyObject other)
Specified by:
compareTo in interface java.lang.Comparable<IRubyObject>
Overrides:
compareTo in class RubyBasicObject

op_cmp

public IRubyObject op_cmp(ThreadContext context,
                          IRubyObject other)

op_cmp19

public IRubyObject op_cmp19(ThreadContext context,
                            IRubyObject other)

op_equal

public IRubyObject op_equal(ThreadContext context,
                            IRubyObject other)
rb_str_equal

Specified by:
op_equal in interface IRubyObject
Overrides:
op_equal in class RubyObject

op_equal19

public IRubyObject op_equal19(ThreadContext context,
                              IRubyObject other)

op_plus

public IRubyObject op_plus(ThreadContext context,
                           RubyString str)

op_plus

public IRubyObject op_plus(ThreadContext context,
                           IRubyObject other)

op_plus19

public IRubyObject op_plus19(ThreadContext context,
                             RubyString str)

op_plus19

public IRubyObject op_plus19(ThreadContext context,
                             IRubyObject other)

op_mul

public IRubyObject op_mul(ThreadContext context,
                          IRubyObject other)

op_mul19

public IRubyObject op_mul19(ThreadContext context,
                            IRubyObject other)

op_format

public IRubyObject op_format(ThreadContext context,
                             IRubyObject arg)

hash

public RubyFixnum hash()
Description copied from class: RubyObject
rb_obj_id Will return the hash code of this object. In comparison to MRI, this method will use the Java identity hash code instead of using rb_obj_id, since the usage of id in JRuby will incur the cost of some. ObjectSpace maintenance.

Overrides:
hash in class RubyObject

hashCode

public int hashCode()
Description copied from class: RubyObject
Override the Object#hashCode method to make sure that the Ruby hash is actually used as the hashcode for Ruby objects. If the Ruby "hash" method doesn't return a number, the Object#hashCode implementation will be used instead.

Overrides:
hashCode in class RubyObject

equals

public boolean equals(java.lang.Object other)
Description copied from class: RubyObject
This method is just a wrapper around the Ruby "==" method, provided so that RubyObjects can be used as keys in the Java HashMap object underlying RubyHash.

Overrides:
equals in class RubyObject

objAsString

public static RubyString objAsString(ThreadContext context,
                                     IRubyObject obj)
rb_obj_as_string


op_cmp

public final int op_cmp(RubyString other)
rb_str_cmp


op_cmp19

public final int op_cmp19(RubyString other)

asJavaString

public java.lang.String asJavaString()
rb_to_id

Specified by:
asJavaString in interface IRubyObject
Overrides:
asJavaString in class RubyBasicObject
Returns:
String the symbol name

doClone

public IRubyObject doClone()

cat

public final RubyString cat(byte[] str)

cat

public final RubyString cat(byte[] str,
                            int beg,
                            int len)

cat19

public final RubyString cat19(RubyString str)

cat

public final RubyString cat(org.jruby.util.ByteList str)

cat

public final RubyString cat(byte ch)

cat

public final RubyString cat(int ch)

cat

public final RubyString cat(int code,
                            org.jcodings.Encoding enc)

cat

public final int cat(byte[] bytes,
                     int p,
                     int len,
                     org.jcodings.Encoding enc,
                     int cr,
                     int cr2)

cat

public final int cat(byte[] bytes,
                     int p,
                     int len,
                     org.jcodings.Encoding enc)

catAscii

public final RubyString catAscii(byte[] bytes,
                                 int p,
                                 int len)

replace

public IRubyObject replace(IRubyObject other)
rb_str_replace_m


replace19

public RubyString replace19(IRubyObject other)

clear

public RubyString clear()

reverse

public IRubyObject reverse(ThreadContext context)

reverse19

public IRubyObject reverse19(ThreadContext context)

reverse_bang

public RubyString reverse_bang(ThreadContext context)

reverse_bang19

public RubyString reverse_bang19(ThreadContext context)

newInstance

public static RubyString newInstance(IRubyObject recv,
                                     IRubyObject[] args,
                                     Block block)
rb_str_s_new


initialize

public IRubyObject initialize()
Description copied from class: RubyObject
rb_obj_dummy Default initialize method. This one gets defined in some other place as a Ruby method.

Overrides:
initialize in class RubyObject

initialize

public IRubyObject initialize(IRubyObject arg0)

casecmp

public IRubyObject casecmp(ThreadContext context,
                           IRubyObject other)

casecmp19

public IRubyObject casecmp19(ThreadContext context,
                             IRubyObject other)

op_match

public IRubyObject op_match(ThreadContext context,
                            IRubyObject other)
rb_str_match

Overrides:
op_match in class RubyObject

op_match19

public IRubyObject op_match19(ThreadContext context,
                              IRubyObject other)

match

public IRubyObject match(ThreadContext context,
                         IRubyObject pattern)
String#match(pattern) rb_str_match_m

Parameters:
pattern - Regexp or String

match19

public IRubyObject match19(ThreadContext context,
                           IRubyObject pattern,
                           Block block)

match19

public IRubyObject match19(ThreadContext context,
                           IRubyObject[] args,
                           Block block)

capitalize

public IRubyObject capitalize(ThreadContext context)
rb_str_capitalize / rb_str_capitalize_bang


capitalize_bang

public IRubyObject capitalize_bang(ThreadContext context)

capitalize19

public IRubyObject capitalize19(ThreadContext context)

capitalize_bang19

public IRubyObject capitalize_bang19(ThreadContext context)

op_ge

public IRubyObject op_ge(ThreadContext context,
                         IRubyObject other)

op_ge19

public IRubyObject op_ge19(ThreadContext context,
                           IRubyObject other)

op_gt

public IRubyObject op_gt(ThreadContext context,
                         IRubyObject other)

op_gt19

public IRubyObject op_gt19(ThreadContext context,
                           IRubyObject other)

op_le

public IRubyObject op_le(ThreadContext context,
                         IRubyObject other)

op_le19

public IRubyObject op_le19(ThreadContext context,
                           IRubyObject other)

op_lt

public IRubyObject op_lt(ThreadContext context,
                         IRubyObject other)

op_lt19

public IRubyObject op_lt19(ThreadContext context,
                           IRubyObject other)

str_eql_p

public IRubyObject str_eql_p(ThreadContext context,
                             IRubyObject other)

str_eql_p19

public IRubyObject str_eql_p19(ThreadContext context,
                               IRubyObject other)

upcase

public RubyString upcase(ThreadContext context)
rb_str_upcase / rb_str_upcase_bang


upcase_bang

public IRubyObject upcase_bang(ThreadContext context)

upcase19

public RubyString upcase19(ThreadContext context)

upcase_bang19

public IRubyObject upcase_bang19(ThreadContext context)

downcase

public RubyString downcase(ThreadContext context)
rb_str_downcase / rb_str_downcase_bang


downcase_bang

public IRubyObject downcase_bang(ThreadContext context)

downcase19

public RubyString downcase19(ThreadContext context)

downcase_bang19

public IRubyObject downcase_bang19(ThreadContext context)

swapcase

public RubyString swapcase(ThreadContext context)
rb_str_swapcase / rb_str_swapcase_bang


swapcase_bang

public IRubyObject swapcase_bang(ThreadContext context)

swapcase19

public RubyString swapcase19(ThreadContext context)

swapcase_bang19

public IRubyObject swapcase_bang19(ThreadContext context)

dump

public IRubyObject dump()
rb_str_dump


dump19

public IRubyObject dump19()

insert

public IRubyObject insert(ThreadContext context,
                          IRubyObject indexArg,
                          IRubyObject stringArg)

insert19

public IRubyObject insert19(ThreadContext context,
                            IRubyObject indexArg,
                            IRubyObject stringArg)

inspect

public IRubyObject inspect()
rb_str_inspect

Specified by:
inspect in interface IRubyObject
Overrides:
inspect in class RubyObject
Returns:
String

inspect19

public IRubyObject inspect19()

isEVStr

public boolean isEVStr(int c)

length

public RubyFixnum length()
rb_str_length


length19

public RubyFixnum length19()

bytesize

public RubyFixnum bytesize()

empty_p

public RubyBoolean empty_p(ThreadContext context)
rb_str_empty


isEmpty

public boolean isEmpty()

append

public RubyString append(IRubyObject other)
rb_str_append


append19

public RubyString append19(IRubyObject other)

concat

public RubyString concat(IRubyObject other)
rb_str_concat


concat19

public RubyString concat19(ThreadContext context,
                           IRubyObject other)

crypt

public RubyString crypt(ThreadContext context,
                        IRubyObject other)
rb_str_crypt


stringValue

public static RubyString stringValue(IRubyObject object)

sub

public IRubyObject sub(ThreadContext context,
                       IRubyObject arg0,
                       Block block)
rb_str_sub / rb_str_sub_bang


sub

public IRubyObject sub(ThreadContext context,
                       IRubyObject arg0,
                       IRubyObject arg1,
                       Block block)

sub_bang

public IRubyObject sub_bang(ThreadContext context,
                            IRubyObject arg0,
                            Block block)

sub_bang

public IRubyObject sub_bang(ThreadContext context,
                            IRubyObject arg0,
                            IRubyObject arg1,
                            Block block)

sub19

public IRubyObject sub19(ThreadContext context,
                         IRubyObject arg0,
                         Block block)

sub19

public IRubyObject sub19(ThreadContext context,
                         IRubyObject arg0,
                         IRubyObject arg1,
                         Block block)

sub_bang19

public IRubyObject sub_bang19(ThreadContext context,
                              IRubyObject arg0,
                              Block block)

sub_bang19

public IRubyObject sub_bang19(ThreadContext context,
                              IRubyObject arg0,
                              IRubyObject arg1,
                              Block block)

gsub

public IRubyObject gsub(ThreadContext context,
                        IRubyObject arg0,
                        Block block)
rb_str_gsub / rb_str_gsub_bang


gsub

public IRubyObject gsub(ThreadContext context,
                        IRubyObject arg0,
                        IRubyObject arg1,
                        Block block)

gsub_bang

public IRubyObject gsub_bang(ThreadContext context,
                             IRubyObject arg0,
                             Block block)

gsub_bang

public IRubyObject gsub_bang(ThreadContext context,
                             IRubyObject arg0,
                             IRubyObject arg1,
                             Block block)

gsub19

public IRubyObject gsub19(ThreadContext context,
                          IRubyObject arg0,
                          Block block)

gsub19

public IRubyObject gsub19(ThreadContext context,
                          IRubyObject arg0,
                          IRubyObject arg1,
                          Block block)

gsub_bang19

public IRubyObject gsub_bang19(ThreadContext context,
                               IRubyObject arg0,
                               Block block)

gsub_bang19

public IRubyObject gsub_bang19(ThreadContext context,
                               IRubyObject arg0,
                               IRubyObject arg1,
                               Block block)

index

public IRubyObject index(ThreadContext context,
                         IRubyObject arg0)
rb_str_index_m


index

public IRubyObject index(ThreadContext context,
                         IRubyObject arg0,
                         IRubyObject arg1)

index19

public IRubyObject index19(ThreadContext context,
                           IRubyObject arg0)

index19

public IRubyObject index19(ThreadContext context,
                           IRubyObject arg0,
                           IRubyObject arg1)

rindex

public IRubyObject rindex(ThreadContext context,
                          IRubyObject arg0)
rb_str_rindex_m


rindex

public IRubyObject rindex(ThreadContext context,
                          IRubyObject arg0,
                          IRubyObject arg1)

rindex19

public IRubyObject rindex19(ThreadContext context,
                            IRubyObject arg0)

rindex19

public IRubyObject rindex19(ThreadContext context,
                            IRubyObject arg0,
                            IRubyObject arg1)

substr

@Deprecated
public final IRubyObject substr(int beg,
                                           int len)
Deprecated. 


substr

public final IRubyObject substr(Ruby runtime,
                                int beg,
                                int len)

substr19

public final IRubyObject substr19(Ruby runtime,
                                  int beg,
                                  int len)

op_aref

public IRubyObject op_aref(ThreadContext context,
                           IRubyObject arg1,
                           IRubyObject arg2)
rb_str_aref, rb_str_aref_m


op_aref

public IRubyObject op_aref(ThreadContext context,
                           IRubyObject arg)

op_aref19

public IRubyObject op_aref19(ThreadContext context,
                             IRubyObject arg1,
                             IRubyObject arg2)

op_aref19

public IRubyObject op_aref19(ThreadContext context,
                             IRubyObject arg)

op_aset

public IRubyObject op_aset(ThreadContext context,
                           IRubyObject arg0,
                           IRubyObject arg1)
rb_str_aset, rb_str_aset_m


op_aset

public IRubyObject op_aset(ThreadContext context,
                           IRubyObject arg0,
                           IRubyObject arg1,
                           IRubyObject arg2)

op_aset19

public IRubyObject op_aset19(ThreadContext context,
                             IRubyObject arg0,
                             IRubyObject arg1)

op_aset19

public IRubyObject op_aset19(ThreadContext context,
                             IRubyObject arg0,
                             IRubyObject arg1,
                             IRubyObject arg2)

slice_bang

public IRubyObject slice_bang(ThreadContext context,
                              IRubyObject arg0)
rb_str_slice_bang


slice_bang

public IRubyObject slice_bang(ThreadContext context,
                              IRubyObject arg0,
                              IRubyObject arg1)

slice_bang19

public IRubyObject slice_bang19(ThreadContext context,
                                IRubyObject arg0)

slice_bang19

public IRubyObject slice_bang19(ThreadContext context,
                                IRubyObject arg0,
                                IRubyObject arg1)

succ

public IRubyObject succ(ThreadContext context)

succ_bang

public IRubyObject succ_bang()

succ19

public IRubyObject succ19(ThreadContext context)

succ_bang19

public IRubyObject succ_bang19()

upto18

public IRubyObject upto18(ThreadContext context,
                          IRubyObject end,
                          Block block)
rb_str_upto_m


upto18

public IRubyObject upto18(ThreadContext context,
                          IRubyObject end,
                          IRubyObject excl,
                          Block block)

upto19

public IRubyObject upto19(ThreadContext context,
                          IRubyObject end,
                          Block block)

upto19

public IRubyObject upto19(ThreadContext context,
                          IRubyObject end,
                          IRubyObject excl,
                          Block block)

include_p

public RubyBoolean include_p(ThreadContext context,
                             IRubyObject obj)
rb_str_include


include_p19

public RubyBoolean include_p19(ThreadContext context,
                               IRubyObject obj)

chr

public IRubyObject chr(ThreadContext context)

getbyte

public IRubyObject getbyte(ThreadContext context,
                           IRubyObject index)

setbyte

public IRubyObject setbyte(ThreadContext context,
                           IRubyObject index,
                           IRubyObject val)

to_i

public IRubyObject to_i()
rb_str_to_i


to_i

public IRubyObject to_i(IRubyObject arg0)
rb_str_to_i


stringToInum

public IRubyObject stringToInum(int base,
                                boolean badcheck)
rb_str_to_inum


stringToDouble

public double stringToDouble(boolean badcheck)
rb_str_to_dbl


oct

public IRubyObject oct(ThreadContext context)
rb_str_oct


oct19

public IRubyObject oct19(ThreadContext context)

hex

public IRubyObject hex(ThreadContext context)
rb_str_hex


hex19

public IRubyObject hex19(ThreadContext context)

to_f

public IRubyObject to_f()
rb_str_to_f


split

public RubyArray split(ThreadContext context)
rb_str_split_m


split

public RubyArray split(ThreadContext context,
                       IRubyObject arg0)

split

public RubyArray split(ThreadContext context,
                       IRubyObject arg0,
                       IRubyObject arg1)

split19

public RubyArray split19(ThreadContext context)

split19

public RubyArray split19(ThreadContext context,
                         IRubyObject arg0)

split19

public RubyArray split19(ThreadContext context,
                         IRubyObject arg0,
                         IRubyObject arg1)

scan

public IRubyObject scan(ThreadContext context,
                        IRubyObject arg,
                        Block block)
rb_str_scan


scan19

public IRubyObject scan19(ThreadContext context,
                          IRubyObject arg,
                          Block block)

start_with_p

public IRubyObject start_with_p(ThreadContext context)

start_with_p

public IRubyObject start_with_p(ThreadContext context,
                                IRubyObject arg)

start_with_p

public IRubyObject start_with_p(ThreadContext context,
                                IRubyObject[] args)

end_with_p

public IRubyObject end_with_p(ThreadContext context)

end_with_p

public IRubyObject end_with_p(ThreadContext context,
                              IRubyObject arg)

end_with_p

public IRubyObject end_with_p(ThreadContext context,
                              IRubyObject[] args)

ljust

public IRubyObject ljust(IRubyObject arg0)
rb_str_ljust


ljust

public IRubyObject ljust(IRubyObject arg0,
                         IRubyObject arg1)

ljust19

public IRubyObject ljust19(IRubyObject arg0)

ljust19

public IRubyObject ljust19(IRubyObject arg0,
                           IRubyObject arg1)

rjust

public IRubyObject rjust(IRubyObject arg0)
rb_str_rjust


rjust

public IRubyObject rjust(IRubyObject arg0,
                         IRubyObject arg1)

rjust19

public IRubyObject rjust19(IRubyObject arg0)

rjust19

public IRubyObject rjust19(IRubyObject arg0,
                           IRubyObject arg1)

center

public IRubyObject center(IRubyObject arg0)
rb_str_center


center

public IRubyObject center(IRubyObject arg0,
                          IRubyObject arg1)

center19

public IRubyObject center19(IRubyObject arg0)

center19

public IRubyObject center19(IRubyObject arg0,
                            IRubyObject arg1)

partition

public IRubyObject partition(ThreadContext context,
                             Block block)

partition

public IRubyObject partition(ThreadContext context,
                             IRubyObject arg,
                             Block block)

rpartition

public IRubyObject rpartition(ThreadContext context,
                              IRubyObject arg)

chop

public IRubyObject chop(ThreadContext context)
rb_str_chop / rb_str_chop_bang


chop_bang

public IRubyObject chop_bang(ThreadContext context)

chop19

public IRubyObject chop19(ThreadContext context)

chop_bang19

public IRubyObject chop_bang19(ThreadContext context)

chomp

public RubyString chomp(ThreadContext context)
rb_str_chop


chomp

public RubyString chomp(ThreadContext context,
                        IRubyObject arg0)

chomp_bang

public IRubyObject chomp_bang(ThreadContext context)
rb_str_chomp_bang In the common case, removes CR and LF characters in various ways depending on the value of the optional args[0]. If args.length==0 removes one instance of CR, CRLF or LF from the end of the string. If args.length>0 and args[0] is "\n" then same behaviour as args.length==0 . If args.length>0 and args[0] is "" then removes trailing multiple LF or CRLF (but no CRs at all(!)).

Parameters:
args - See method description.

chomp_bang

public IRubyObject chomp_bang(ThreadContext context,
                              IRubyObject arg0)

chomp19

public RubyString chomp19(ThreadContext context)

chomp19

public RubyString chomp19(ThreadContext context,
                          IRubyObject arg0)

chomp_bang19

public IRubyObject chomp_bang19(ThreadContext context)

chomp_bang19

public IRubyObject chomp_bang19(ThreadContext context,
                                IRubyObject arg0)

lstrip

public IRubyObject lstrip(ThreadContext context)
rb_str_lstrip / rb_str_lstrip_bang


lstrip_bang

public IRubyObject lstrip_bang(ThreadContext context)

lstrip19

public IRubyObject lstrip19(ThreadContext context)

lstrip_bang19

public IRubyObject lstrip_bang19(ThreadContext context)

rstrip

public IRubyObject rstrip(ThreadContext context)
rb_str_rstrip / rb_str_rstrip_bang


rstrip_bang

public IRubyObject rstrip_bang(ThreadContext context)

rstrip19

public IRubyObject rstrip19(ThreadContext context)

rstrip_bang19

public IRubyObject rstrip_bang19(ThreadContext context)

strip

public IRubyObject strip(ThreadContext context)
rb_str_strip / rb_str_strip_bang


strip_bang

public IRubyObject strip_bang(ThreadContext context)

strip19

public IRubyObject strip19(ThreadContext context)

strip_bang19

public IRubyObject strip_bang19(ThreadContext context)

count

public IRubyObject count(ThreadContext context)
rb_str_count


count

public IRubyObject count(ThreadContext context,
                         IRubyObject arg)

count

public IRubyObject count(ThreadContext context,
                         IRubyObject[] args)

count19

public IRubyObject count19(ThreadContext context)

count19

public IRubyObject count19(ThreadContext context,
                           IRubyObject arg)

count19

public IRubyObject count19(ThreadContext context,
                           IRubyObject[] args)

delete

public IRubyObject delete(ThreadContext context)
rb_str_delete / rb_str_delete_bang


delete

public IRubyObject delete(ThreadContext context,
                          IRubyObject arg)

delete

public IRubyObject delete(ThreadContext context,
                          IRubyObject[] args)

delete_bang

public IRubyObject delete_bang(ThreadContext context)

delete_bang

public IRubyObject delete_bang(ThreadContext context,
                               IRubyObject arg)

delete_bang

public IRubyObject delete_bang(ThreadContext context,
                               IRubyObject[] args)

delete19

public IRubyObject delete19(ThreadContext context)

delete19

public IRubyObject delete19(ThreadContext context,
                            IRubyObject arg)

delete19

public IRubyObject delete19(ThreadContext context,
                            IRubyObject[] args)

delete_bang19

public IRubyObject delete_bang19(ThreadContext context)

delete_bang19

public IRubyObject delete_bang19(ThreadContext context,
                                 IRubyObject arg)

delete_bang19

public IRubyObject delete_bang19(ThreadContext context,
                                 IRubyObject[] args)

squeeze

public IRubyObject squeeze(ThreadContext context)
rb_str_squeeze / rb_str_squeeze_bang


squeeze

public IRubyObject squeeze(ThreadContext context,
                           IRubyObject arg)

squeeze

public IRubyObject squeeze(ThreadContext context,
                           IRubyObject[] args)

squeeze_bang

public IRubyObject squeeze_bang(ThreadContext context)

squeeze_bang

public IRubyObject squeeze_bang(ThreadContext context,
                                IRubyObject arg)

squeeze_bang

public IRubyObject squeeze_bang(ThreadContext context,
                                IRubyObject[] args)

squeeze19

public IRubyObject squeeze19(ThreadContext context)

squeeze19

public IRubyObject squeeze19(ThreadContext context,
                             IRubyObject arg)

squeeze19

public IRubyObject squeeze19(ThreadContext context,
                             IRubyObject[] args)

squeeze_bang19

public IRubyObject squeeze_bang19(ThreadContext context)

squeeze_bang19

public IRubyObject squeeze_bang19(ThreadContext context,
                                  IRubyObject arg)

squeeze_bang19

public IRubyObject squeeze_bang19(ThreadContext context,
                                  IRubyObject[] args)

tr

public IRubyObject tr(ThreadContext context,
                      IRubyObject src,
                      IRubyObject repl)
rb_str_tr / rb_str_tr_bang


tr_bang

public IRubyObject tr_bang(ThreadContext context,
                           IRubyObject src,
                           IRubyObject repl)

tr19

public IRubyObject tr19(ThreadContext context,
                        IRubyObject src,
                        IRubyObject repl)

tr_bang19

public IRubyObject tr_bang19(ThreadContext context,
                             IRubyObject src,
                             IRubyObject repl)

tr_s

public IRubyObject tr_s(ThreadContext context,
                        IRubyObject src,
                        IRubyObject repl)
rb_str_tr_s / rb_str_tr_s_bang


tr_s_bang

public IRubyObject tr_s_bang(ThreadContext context,
                             IRubyObject src,
                             IRubyObject repl)

tr_s19

public IRubyObject tr_s19(ThreadContext context,
                          IRubyObject src,
                          IRubyObject repl)

tr_s_bang19

public IRubyObject tr_s_bang19(ThreadContext context,
                               IRubyObject src,
                               IRubyObject repl)

each_line

public IRubyObject each_line(ThreadContext context,
                             Block block)
rb_str_each_line


each_line

public IRubyObject each_line(ThreadContext context,
                             IRubyObject arg,
                             Block block)

each_lineCommon

public IRubyObject each_lineCommon(ThreadContext context,
                                   IRubyObject sep,
                                   Block block)

each18

public IRubyObject each18(ThreadContext context,
                          Block block)

each18

public IRubyObject each18(ThreadContext context,
                          IRubyObject arg,
                          Block block)

each_line18

public IRubyObject each_line18(ThreadContext context,
                               Block block)

each_line18

public IRubyObject each_line18(ThreadContext context,
                               IRubyObject arg,
                               Block block)

lines18

public IRubyObject lines18(ThreadContext context,
                           Block block)

lines18

public IRubyObject lines18(ThreadContext context,
                           IRubyObject arg,
                           Block block)

each19

public IRubyObject each19(ThreadContext context,
                          Block block)

each19

public IRubyObject each19(ThreadContext context,
                          IRubyObject arg,
                          Block block)

each_line19

public IRubyObject each_line19(ThreadContext context,
                               Block block)

each_line19

public IRubyObject each_line19(ThreadContext context,
                               IRubyObject arg,
                               Block block)

lines

public IRubyObject lines(ThreadContext context,
                         Block block)

lines

public IRubyObject lines(ThreadContext context,
                         IRubyObject arg,
                         Block block)

each_byte

public RubyString each_byte(ThreadContext context,
                            Block block)
rb_str_each_byte


each_byte19

public IRubyObject each_byte19(ThreadContext context,
                               Block block)

bytes

public IRubyObject bytes(ThreadContext context,
                         Block block)

each_char18

public IRubyObject each_char18(ThreadContext context,
                               Block block)
rb_str_each_char


chars18

public IRubyObject chars18(ThreadContext context,
                           Block block)

each_char19

public IRubyObject each_char19(ThreadContext context,
                               Block block)

chars19

public IRubyObject chars19(ThreadContext context,
                           Block block)

each_codepoint

public IRubyObject each_codepoint(ThreadContext context,
                                  Block block)
rb_str_each_codepoint


codepoints

public IRubyObject codepoints(ThreadContext context,
                              Block block)

intern

public RubySymbol intern()

intern19

public RubySymbol intern19()

ord

public IRubyObject ord(ThreadContext context)

sum

public IRubyObject sum(ThreadContext context)

sum

public IRubyObject sum(ThreadContext context,
                       IRubyObject arg)

sumCommon

public IRubyObject sumCommon(ThreadContext context,
                             long bits)

to_c

public IRubyObject to_c(ThreadContext context)
string_to_c


to_r

public IRubyObject to_r(ThreadContext context)
string_to_r


unmarshalFrom

public static RubyString unmarshalFrom(UnmarshalStream input)
                                throws java.io.IOException
Throws:
java.io.IOException

unpack

public RubyArray unpack(IRubyObject obj)
See Also:
Pack.unpack(org.jruby.Ruby, org.jruby.util.ByteList, org.jruby.util.ByteList)

empty

public void empty()

encoding

public IRubyObject encoding(ThreadContext context)

encode_bang

public IRubyObject encode_bang(ThreadContext context,
                               IRubyObject enc)

force_encoding

public IRubyObject force_encoding(ThreadContext context,
                                  IRubyObject enc)

valid_encoding_p

public IRubyObject valid_encoding_p(ThreadContext context)

ascii_only_p

public IRubyObject ascii_only_p(ThreadContext context)

setValue

public void setValue(java.lang.CharSequence value)
Deprecated. 

Mutator for internal string representation.

Parameters:
value - The new java.lang.String this RubyString should encapsulate

setValue

public void setValue(org.jruby.util.ByteList value)

getValue

public java.lang.CharSequence getValue()

getBytes

public byte[] getBytes()

getByteList

public org.jruby.util.ByteList getByteList()

getUnicodeValue

public java.lang.String getUnicodeValue()
used by ar-jdbc


to_java

public IRubyObject to_java()
Overrides:
to_java in class RubyObject

toJava

public java.lang.Object toJava(java.lang.Class target)
Description copied from interface: IRubyObject
Convert the object to the specified Java class, if possible.

Specified by:
toJava in interface IRubyObject
Overrides:
toJava in class RubyBasicObject
Parameters:
target - The target type to which the object should be converted.
See Also:
IRubyObject.toJava

initialize

@Deprecated
public IRubyObject initialize(IRubyObject[] args,
                                         Block unusedBlock)
Deprecated. Use the versions with zero or one arguments

Variable-arity versions for compatibility. Not bound to Ruby.


sub

@Deprecated
public IRubyObject sub(ThreadContext context,
                                  IRubyObject[] args,
                                  Block block)
Deprecated. 


sub_bang

@Deprecated
public IRubyObject sub_bang(ThreadContext context,
                                       IRubyObject[] args,
                                       Block block)
Deprecated. 


gsub

@Deprecated
public IRubyObject gsub(ThreadContext context,
                                   IRubyObject[] args,
                                   Block block)
Deprecated. 


gsub_bang

@Deprecated
public IRubyObject gsub_bang(ThreadContext context,
                                        IRubyObject[] args,
                                        Block block)
Deprecated. 


index

@Deprecated
public IRubyObject index(ThreadContext context,
                                    IRubyObject[] args)
Deprecated. 


rindex

@Deprecated
public IRubyObject rindex(ThreadContext context,
                                     IRubyObject[] args)
Deprecated. 


op_aref

@Deprecated
public IRubyObject op_aref(ThreadContext context,
                                      IRubyObject[] args)
Deprecated. 


op_aset

@Deprecated
public IRubyObject op_aset(ThreadContext context,
                                      IRubyObject[] args)
Deprecated. 


slice_bang

@Deprecated
public IRubyObject slice_bang(ThreadContext context,
                                         IRubyObject[] args)
Deprecated. 


to_i

@Deprecated
public IRubyObject to_i(IRubyObject[] args)
Deprecated. 


split

@Deprecated
public RubyArray split(ThreadContext context,
                                  IRubyObject[] args)
Deprecated. 


ljust

@Deprecated
public IRubyObject ljust(IRubyObject[] args)
Deprecated. 


rjust

@Deprecated
public IRubyObject rjust(IRubyObject[] args)
Deprecated. 


center

@Deprecated
public IRubyObject center(IRubyObject[] args)
Deprecated. 


chomp

@Deprecated
public RubyString chomp(IRubyObject[] args)
Deprecated. 


chomp_bang

@Deprecated
public IRubyObject chomp_bang(IRubyObject[] args)
Deprecated. 



Copyright © 2002-2009 JRuby Team. All Rights Reserved.