Save This Page
Home » jruby-src-1.1.3 » org.jruby » [javadoc | source]
org.jruby
public class: RubyString [javadoc | source]
java.lang.Object
   org.jruby.RubyObject
      org.jruby.RubyString

All Implemented Interfaces:
    VALUE

Implementation of Ruby String class Concurrency: no synchronization is required among readers, but all users must synchronize externally with writers.
Method from org.jruby.RubyString Summary:
append,   asJavaString,   asString,   byteListToString,   bytesToString,   bytesToString,   capitalize,   capitalize_bang,   casecmp,   cat,   cat,   cat,   cat,   center,   center,   center,   checkStringType,   chomp,   chomp,   chomp,   chomp_bang,   chomp_bang,   chomp_bang,   chop,   chop_bang,   concat,   convertToString,   count,   createStringClass,   crypt,   delete,   delete_bang,   doClone,   downcase,   downcase_bang,   dump,   each_byte,   each_line,   empty,   empty_p,   eql,   equals,   getByteList,   getBytes,   getJavaClass,   getNativeTypeIndex,   getUnicodeValue,   getValue,   gsub,   gsub,   gsub,   gsub_bang,   gsub_bang,   gsub_bang,   hash,   hashCode,   hex,   include_p,   index,   index,   index,   initialize,   initialize,   initialize,   insert,   inspect,   intern,   isAlnum,   isDigit,   isEmpty,   isLetter,   isLower,   isPrint,   isUpper,   length,   ljust,   ljust,   ljust,   lstrip,   lstrip_bang,   makeShared,   match,   modify,   modify,   modifyCheck,   newEmptyString,   newEmptyString,   newInstance,   newString,   newString,   newString,   newString,   newString,   newString,   newString,   newStringLight,   newStringShared,   newStringShared,   newStringShared,   newStringShared,   newUnicodeString,   objAsString,   oct,   op_aref,   op_aref,   op_aref,   op_aset,   op_aset,   op_aset,   op_cmp,   op_cmp,   op_equal,   op_format,   op_ge,   op_gt,   op_le,   op_lt,   op_match,   op_match2,   op_mul,   op_plus,   replace,   replace,   reverse,   reverse_bang,   rindex,   rindex,   rindex,   rjust,   rjust,   rjust,   rstrip,   rstrip_bang,   scan,   setValue,   setValue,   slice_bang,   slice_bang,   slice_bang,   split,   split,   split,   split,   squeeze,   squeeze_bang,   strDup,   strDup,   strDup,   strDup,   str_eql_p,   stringToBytes,   stringValue,   strip,   strip_bang,   sub,   sub,   sub,   sub_bang,   sub_bang,   sub_bang,   substr,   substr,   succ,   succ_bang,   sum,   swapcase,   swapcase_bang,   toString,   to_f,   to_i,   to_i,   to_i,   to_java,   to_s,   to_sym,   tr,   tr_bang,   tr_s,   tr_s_bang,   unmarshalFrom,   unpack,   upcase,   upcase_bang,   upto,   upto
Methods from org.jruby.RubyObject:
callInit,   defineSingletonMethod,   funcall,   funcall,   funcall,   funcall3,   getClassVarSingleton,   getInstanceVar,   getInstanceVar,   getInstanceVariables,   getRuby,   getRubyClass,   getSingletonClass,   infectObject,   isFalse,   isFrozen,   isImmediate,   isInstanceVarDefined,   isNil,   isSpecialConst,   isTaint,   isTrue,   m_clone,   m_dup,   m_equal,   m_freeze,   m_frozen,   m_id,   m_inspect,   m_instance_of,   m_kind_of,   m_methods,   m_private_methods,   m_protected_methods,   m_singleton_methods,   m_taint,   m_tainted,   m_to_s,   m_type,   m_untaint,   setFrozen,   setImmediate,   setInstanceVar,   setInstanceVar,   setInstanceVariables,   setRuby,   setRubyClass,   setTaint,   setupClone,   setupObject
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jruby.RubyString Detail:
 public RubyString append(IRubyObject other) 
    rb_str_append
 public String asJavaString() 
    rb_to_id
 public RubyString asString() 
 public static String byteListToString(ByteList bytes) 
 public static String bytesToString(byte[] bytes) 
 public static String bytesToString(byte[] bytes,
    int beg,
    int len) 
 public IRubyObject capitalize(ThreadContext context) 
    rb_str_capitalize
 public IRubyObject capitalize_bang(ThreadContext context) 
    rb_str_capitalize_bang
 public IRubyObject casecmp(IRubyObject other) 
 public RubyString cat(byte[] str) 
 public RubyString cat(ByteList str) 
 public RubyString cat(byte ch) 
 public RubyString cat(byte[] str,
    int beg,
    int len) 
 public IRubyObject center(IRubyObject[] args) 
Deprecated! use - the one or two argument versions.

    Variable-arity version for compatibility. Not bound to Ruby.
 public IRubyObject center(IRubyObject arg0) 
    rb_str_center
 public IRubyObject center(IRubyObject arg0,
    IRubyObject arg1) 
    rb_str_center
 public IRubyObject checkStringType() 
 public RubyString chomp() 
    rb_str_chop
 public RubyString chomp(IRubyObject[] args) 
Deprecated! Use - the zero or one argument versions.

    Variable-arity version for compatibility. Not bound to Ruby
 public RubyString chomp(IRubyObject arg0) 
    rb_str_chop
 public IRubyObject chomp_bang() 
    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(!)).
 public IRubyObject chomp_bang(IRubyObject[] args) 
Deprecated! Use - the zero or one argument versions.

    Variable-arity version for compatibility. Not bound to Ruby.
 public IRubyObject chomp_bang(IRubyObject arg0) 
    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(!)).
 public IRubyObject chop(ThreadContext context) 
 public IRubyObject chop_bang() 
    rb_str_chop_bang
 public RubyString concat(IRubyObject other) 
    rb_str_concat
 public RubyString convertToString() 
 public IRubyObject count(IRubyObject[] args) 
    rb_str_count
 public static RubyClass createStringClass(Ruby runtime) 
 public RubyString crypt(ThreadContext context,
    IRubyObject other) 
    rb_str_crypt
 public IRubyObject delete(ThreadContext context,
    IRubyObject[] args) 
    rb_str_delete
 public IRubyObject delete_bang(IRubyObject[] args) 
    rb_str_delete_bang
 public IRubyObject doClone() 
 public RubyString downcase(ThreadContext context) 
    rb_str_downcase
 public IRubyObject downcase_bang(ThreadContext context) 
    rb_str_downcase_bang
 public IRubyObject dump() 
    rb_str_dump
 public RubyString each_byte(ThreadContext context,
    Block block) 
    rb_str_each_byte
 public IRubyObject each_line(ThreadContext context,
    IRubyObject[] args,
    Block block) 
    rb_str_each_line
 public  void empty() 
 public RubyBoolean empty_p(ThreadContext context) 
    rb_str_empty
 public final boolean eql(IRubyObject other) 
    short circuit for String key comparison
 public boolean equals(Object other) 
 public ByteList getByteList() 
 public byte[] getBytes() 
 public Class getJavaClass() 
 public int getNativeTypeIndex() 
 public String getUnicodeValue() 
    used by ar-jdbc
 public CharSequence getValue() 
 public IRubyObject gsub(ThreadContext context,
    IRubyObject[] args,
    Block block) 
Deprecated! Use - the versions with one or two arguments.

    Variable-arity version for compatibility. Not bound to Ruby.
 public IRubyObject gsub(ThreadContext context,
    IRubyObject arg0,
    Block block) 
    rb_str_gsub
 public IRubyObject gsub(ThreadContext context,
    IRubyObject arg0,
    IRubyObject arg1,
    Block block) 
    rb_str_gsub
 public IRubyObject gsub_bang(ThreadContext context,
    IRubyObject[] args,
    Block block) 
Deprecated! Use - the versions with one or two arguments.

    Variable-arity version for compatibility. Not bound to Ruby.
 public IRubyObject gsub_bang(ThreadContext context,
    IRubyObject arg0,
    Block block) 
    rb_str_gsub_bang
 public IRubyObject gsub_bang(ThreadContext context,
    IRubyObject arg0,
    IRubyObject arg1,
    Block block) 
    rb_str_gsub_bang
 public RubyFixnum hash() 
 public int hashCode() 
 public IRubyObject hex(ThreadContext context) 
    rb_str_hex
 public RubyBoolean include_p(ThreadContext context,
    IRubyObject obj) 
    rb_str_include
 public IRubyObject index(ThreadContext context,
    IRubyObject[] args) 
Deprecated! Use - the versions with one or two args.

    Variable-arity version for compatibility. Not bound to Ruby.
 public IRubyObject index(ThreadContext context,
    IRubyObject arg0) 
    rb_str_index_m
 public IRubyObject index(ThreadContext context,
    IRubyObject arg0,
    IRubyObject arg1) 
    rb_str_index_m
 public IRubyObject initialize() 
 public IRubyObject initialize(IRubyObject arg0) 
 public IRubyObject initialize(IRubyObject[] args,
    Block unusedBlock) 
Deprecated! Use - the versions with zero or one arguments

    Variable-arity version for compatibility. Not bound to Ruby.
 public IRubyObject insert(ThreadContext context,
    IRubyObject indexArg,
    IRubyObject stringArg) 
 public IRubyObject inspect() 
    rb_str_inspect
 public RubySymbol intern() 
    rb_str_intern
 public static boolean isAlnum(int c) 
 public static boolean isDigit(int c) 
 public boolean isEmpty() 
 public static boolean isLetter(int c) 
 public static boolean isLower(int c) 
 public static boolean isPrint(int c) 
 public static boolean isUpper(int c) 
 public RubyFixnum length() 
    rb_str_length
 public IRubyObject ljust(IRubyObject[] args) 
Deprecated! use - the one or two argument versions.

    Variable-arity version for compatibility. Not bound to Ruby.
 public IRubyObject ljust(IRubyObject arg0) 
    rb_str_ljust
 public IRubyObject ljust(IRubyObject arg0,
    IRubyObject arg1) 
    rb_str_ljust
 public IRubyObject lstrip(ThreadContext context) 
    rb_str_lstrip
 public IRubyObject lstrip_bang() 
    rb_str_lstrip_bang
 public final RubyString makeShared(Ruby runtime,
    int index,
    int len) 
 public IRubyObject match(ThreadContext context,
    IRubyObject pattern) 
    String#match(pattern) rb_str_match_m
 public final  void modify() 
    rb_str_modify
 public final  void modify(int length) 
    rb_str_modify (with length bytes ensured)
 final  void modifyCheck() 
 public static RubyString newEmptyString(Ruby runtime) 
 public static RubyString newEmptyString(Ruby runtime,
    RubyClass metaClass) 
 public static RubyString newInstance(IRubyObject recv,
    IRubyObject[] args,
    Block block) 
    rb_str_s_new
 public RubyString newString(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.
 public RubyString newString(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.
 public static RubyString newString(Ruby runtime,
    CharSequence str) 
    rb_str_new2
 public static RubyString newString(Ruby runtime,
    byte[] bytes) 
 public static RubyString newString(Ruby runtime,
    ByteList bytes) 
 public static RubyString newString(Ruby runtime,
    RubyClass clazz,
    CharSequence str) 
 public static RubyString newString(Ruby runtime,
    byte[] bytes,
    int start,
    int length) 
 public static RubyString newStringLight(Ruby runtime,
    ByteList bytes) 
 public static RubyString newStringShared(Ruby runtime,
    RubyString orig) 
 public static RubyString newStringShared(Ruby runtime,
    ByteList bytes) 
 public static RubyString newStringShared(Ruby runtime,
    RubyClass clazz,
    ByteList bytes) 
 public static RubyString newStringShared(Ruby runtime,
    byte[] bytes,
    int start,
    int length) 
 public static RubyString newUnicodeString(Ruby runtime,
    String str) 
 public static RubyString objAsString(ThreadContext context,
    IRubyObject obj) 
    rb_obj_as_string
 public IRubyObject oct(ThreadContext context) 
    rb_str_oct
 public IRubyObject op_aref(ThreadContext context,
    IRubyObject[] args) 
Deprecated! Use - the versions with one or two args

    Variable-arity version for compatibility. Not bound to Ruby.
 public IRubyObject op_aref(ThreadContext context,
    IRubyObject arg) 
    rb_str_aref, rb_str_aref_m
 public IRubyObject op_aref(ThreadContext context,
    IRubyObject arg1,
    IRubyObject arg2) 
    rb_str_aref, rb_str_aref_m
 public IRubyObject op_aset(ThreadContext context,
    IRubyObject[] args) 
Deprecated! Use - the versions with two or three args.

    Variable arity version for compatibility. Not bound to a Ruby method.
 public IRubyObject op_aset(ThreadContext context,
    IRubyObject arg0,
    IRubyObject arg1) 
    rb_str_aset, rb_str_aset_m
 public IRubyObject op_aset(ThreadContext context,
    IRubyObject arg0,
    IRubyObject arg1,
    IRubyObject arg2) 
    rb_str_aset, rb_str_aset_m
 public int op_cmp(RubyString other) 
    rb_str_cmp
 public IRubyObject op_cmp(ThreadContext context,
    IRubyObject other) 
 public IRubyObject op_equal(ThreadContext context,
    IRubyObject other) 
 public IRubyObject op_format(ThreadContext context,
    IRubyObject arg) 
 public IRubyObject op_ge(ThreadContext context,
    IRubyObject other) 
 public IRubyObject op_gt(ThreadContext context,
    IRubyObject other) 
 public IRubyObject op_le(ThreadContext context,
    IRubyObject other) 
 public IRubyObject op_lt(ThreadContext context,
    IRubyObject other) 
 public IRubyObject op_match(ThreadContext context,
    IRubyObject other) 
    rb_str_match
 public IRubyObject op_match2(ThreadContext context) 
    rb_str_match2
 public IRubyObject op_mul(ThreadContext context,
    IRubyObject other) 
 public IRubyObject op_plus(ThreadContext context,
    IRubyObject other) 
 public RubyString replace(IRubyObject other) 
    rb_str_replace_m
 public IRubyObject replace(int beg,
    int len,
    RubyString replaceWith) 
 public RubyString reverse(ThreadContext context) 
 public RubyString reverse_bang() 
 public IRubyObject rindex(ThreadContext context,
    IRubyObject[] args) 
Deprecated! Use - the versions with one or two arguments.

    Variable-arity version for compatibility. Not bound to Ruby.
 public IRubyObject rindex(ThreadContext context,
    IRubyObject arg0) 
    rb_str_rindex_m
 public IRubyObject rindex(ThreadContext context,
    IRubyObject arg0,
    IRubyObject arg1) 
    rb_str_rindex_m
 public IRubyObject rjust(IRubyObject[] args) 
Deprecated! use - the one or two argument versions.

    Variable-arity version for compatibility. Not bound to Ruby.
 public IRubyObject rjust(IRubyObject arg0) 
    rb_str_rjust
 public IRubyObject rjust(IRubyObject arg0,
    IRubyObject arg1) 
    rb_str_rjust
 public IRubyObject rstrip(ThreadContext context) 
    rb_str_rstrip
 public IRubyObject rstrip_bang() 
    rb_str_rstrip_bang
 public IRubyObject scan(ThreadContext context,
    IRubyObject arg,
    Block block) 
    rb_str_scan
 public  void setValue(CharSequence value) 
Deprecated!
    Mutator for internal string representation.
 public  void setValue(ByteList value) 
 public IRubyObject slice_bang(ThreadContext context,
    IRubyObject[] args) 
Deprecated! Use - the versions with one or two args.

    Variable arity version for compatibility. Not bound as a Ruby method.
 public IRubyObject slice_bang(ThreadContext context,
    IRubyObject arg0) 
    rb_str_slice_bang
 public IRubyObject slice_bang(ThreadContext context,
    IRubyObject arg0,
    IRubyObject arg1) 
    rb_str_slice_bang
 public RubyArray split(ThreadContext context) 
    rb_str_split_m
 public RubyArray split(ThreadContext context,
    IRubyObject[] args) 
Deprecated! Use - the versions with zero, one, or two args.

    Variable arity version for compatibility. Not bound to a Ruby method.
 public RubyArray split(ThreadContext context,
    IRubyObject arg0) 
    rb_str_split_m
 public RubyArray split(ThreadContext context,
    IRubyObject arg0,
    IRubyObject arg1) 
    rb_str_split_m
 public IRubyObject squeeze(ThreadContext context,
    IRubyObject[] args) 
    rb_str_squeeze
 public IRubyObject squeeze_bang(IRubyObject[] args) 
    rb_str_squeeze_bang
 public final RubyString strDup() 
    rb_str_dup
 public final RubyString strDup(Ruby runtime) 
 final RubyString strDup(RubyClass clazz) 
 final RubyString