|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.RubyObject
org.jruby.RubyString
public class RubyString
Nested Class Summary | |
---|---|
static class |
RubyString.JavaCrypt
|
Nested classes/interfaces inherited from class org.jruby.RubyObject |
---|
RubyObject.Finalizer |
Field Summary | |
---|---|
static byte |
AREF_SWITCHVALUE
|
static byte |
ASET_SWITCHVALUE
|
static byte |
EMPTY_P_SWITCHVALUE
|
static byte |
EQQ_SWITCHVALUE
|
static byte |
EQUALEQUAL_SWITCHVALUE
|
static byte |
HASH_SWITCHVALUE
|
static byte |
INSPECT_SWITCHVALUE
|
static byte |
LENGTH_SWITCHVALUE
|
static byte |
MATCH_SWITCHVALUE
|
static byte |
NIL_P_SWITCHVALUE
|
static byte |
OP_GE_SWITCHVALUE
|
static byte |
OP_GT_SWITCHVALUE
|
static byte |
OP_LE_SWITCHVALUE
|
static byte |
OP_LSHIFT_SWITCHVALUE
|
static byte |
OP_LT_SWITCHVALUE
|
static byte |
OP_PLUS_SWITCHVALUE
|
static byte |
OP_SPACESHIP_SWITCHVALUE
|
static byte |
OP_TIMES_SWITCHVALUE
|
static byte |
TO_I_SWITCHVALUE
|
static byte |
TO_S_SWITCHVALUE
|
static byte |
TO_STR_SWITCHVALUE
|
static byte |
TO_SYM_SWITCHVALUE
|
Fields inherited from class org.jruby.RubyObject |
---|
instanceVariables, isTrue, metaClass, NEVER, OBJECT_ALLOCATOR |
Fields inherited from interface org.jruby.runtime.builtin.IRubyObject |
---|
NULL_ARRAY |
Method Summary | |
---|---|
RubyString |
append(IRubyObject other)
rb_str_append |
IRubyObject |
aref(IRubyObject[] args)
rb_str_aref, rb_str_aref_m |
IRubyObject |
aset(IRubyObject[] args)
rb_str_aset, rb_str_aset_m |
java.lang.String |
asSymbol()
rb_to_id |
static java.lang.String |
byteListToString(ByteList bytes)
|
static java.lang.String |
bytesToString(byte[] bytes)
|
static java.lang.String |
bytesToString(byte[] bytes,
int beg,
int len)
|
IRubyObject |
callMethod(ThreadContext context,
RubyModule rubyclass,
int methodIndex,
java.lang.String name,
IRubyObject[] args,
CallType callType,
Block block)
|
IRubyObject |
capitalize_bang()
rb_str_capitalize_bang |
IRubyObject |
capitalize()
rb_str_capitalize |
IRubyObject |
casecmp(IRubyObject other)
|
RubyString |
cat(byte ch)
|
RubyString |
cat(byte[] str)
|
RubyString |
cat(byte[] str,
int beg,
int len)
|
RubyString |
cat(ByteList str)
|
IRubyObject |
center(IRubyObject[] args)
|
IRubyObject |
checkStringType()
rb_check_string_type |
IRubyObject |
chomp_bang(IRubyObject[] args)
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]. |
RubyString |
chomp(IRubyObject[] args)
rb_str_chop |
IRubyObject |
chop_bang()
rb_str_chop_bang |
IRubyObject |
chop()
|
int |
cmp(RubyString other)
rb_str_cmp |
RubyString |
concat(IRubyObject other)
rb_str_concat |
RubyString |
convertToString()
|
IRubyObject |
count(IRubyObject[] args)
rb_str_count |
static RubyClass |
createStringClass(Ruby runtime)
|
RubyString |
crypt(IRubyObject other)
rb_str_crypt |
IRubyObject |
delete_bang(IRubyObject[] args)
rb_str_delete_bang |
IRubyObject |
delete(IRubyObject[] args)
rb_str_delete |
IRubyObject |
doClone()
|
IRubyObject |
downcase_bang()
rb_str_downcase_bang |
RubyString |
downcase()
rb_str_downcase |
IRubyObject |
dump()
rb_str_dump |
RubyString |
each_byte(Block block)
rb_str_each_byte |
IRubyObject |
each_line(IRubyObject[] args,
Block block)
rb_str_each_line |
RubyBoolean |
empty()
rb_str_empty |
IRubyObject |
eql_p(IRubyObject other)
|
boolean |
eql(IRubyObject other)
short circuit for String key comparison |
IRubyObject |
equal(IRubyObject other)
rb_equal |
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 |
format(IRubyObject arg)
|
ByteList |
getByteList()
|
byte[] |
getBytes()
|
java.lang.Class |
getJavaClass()
RubyMethod getJavaClass. |
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()
|
java.lang.CharSequence |
getValue()
|
IRubyObject |
gsub_bang(IRubyObject[] args,
Block block)
rb_str_gsub_bang |
IRubyObject |
gsub(IRubyObject[] args,
Block block)
rb_str_gsub |
RubyFixnum |
hash()
|
int |
hashCode()
|
IRubyObject |
hex()
rb_str_hex |
RubyBoolean |
include(IRubyObject obj)
rb_str_include |
IRubyObject |
index(IRubyObject[] args)
rb_str_index_m |
IRubyObject |
initialize(IRubyObject[] args,
Block unusedBlock)
|
IRubyObject |
insert(IRubyObject indexArg,
IRubyObject stringArg)
|
IRubyObject |
inspect()
rb_str_inspect |
RubySymbol |
intern()
rb_str_intern |
static boolean |
isAlnum(int c)
|
static boolean |
isDigit(int c)
|
static boolean |
isLetter(int c)
|
static boolean |
isLower(int c)
|
static boolean |
isPrint(int c)
|
static boolean |
isUpper(int c)
|
RubyFixnum |
length()
rb_str_length |
IRubyObject |
ljust(IRubyObject[] args)
rb_str_ljust |
IRubyObject |
lstrip_bang()
rb_str_lstrip_bang |
IRubyObject |
lstrip()
rb_str_lstrip |
RubyString |
makeShared(int index,
int len)
|
IRubyObject |
match(IRubyObject other)
rb_str_match |
IRubyObject |
match2()
rb_str_match2 |
IRubyObject |
match3(IRubyObject pattern)
String#match(pattern) |
void |
modify()
rb_str_modify |
void |
modify(int length)
|
static RubyString |
newInstance(IRubyObject recv,
IRubyObject[] args,
Block block)
rb_str_s_new |
RubyString |
newString(ByteList s)
Create a new String which uses the same Ruby runtime and the same class like this String. |
RubyString |
newString(java.lang.CharSequence s)
Create a new String which uses the same Ruby runtime and the same class like this String. |
static RubyString |
newString(Ruby runtime,
byte[] bytes)
|
static RubyString |
newString(Ruby runtime,
byte[] bytes,
int start,
int length)
|
static RubyString |
newString(Ruby runtime,
ByteList bytes)
|
static RubyString |
newString(Ruby runtime,
java.lang.CharSequence str)
rb_str_new2 |
static RubyString |
newString(Ruby runtime,
RubyClass clazz,
java.lang.CharSequence str)
|
static RubyString |
newStringShared(Ruby runtime,
ByteList bytes)
|
static RubyString |
newStringShared(Ruby runtime,
RubyString orig)
|
static RubyString |
newUnicodeString(Ruby runtime,
java.lang.String str)
|
static RubyString |
objAsString(IRubyObject obj)
rb_obj_as_string |
IRubyObject |
oct()
rb_str_oct |
IRubyObject |
op_cmp(IRubyObject other)
|
IRubyObject |
op_ge(IRubyObject other)
|
IRubyObject |
op_gt(IRubyObject other)
|
IRubyObject |
op_le(IRubyObject other)
|
IRubyObject |
op_lt(IRubyObject other)
|
IRubyObject |
op_mul(IRubyObject other)
|
IRubyObject |
op_plus(IRubyObject other)
|
IRubyObject |
replace(int beg,
int len,
RubyString replaceWith)
|
RubyString |
replace(IRubyObject other)
rb_str_replace_m |
RubyString |
reverse_bang()
|
RubyString |
reverse()
|
IRubyObject |
rindex(IRubyObject[] args)
rb_str_rindex_m |
IRubyObject |
rjust(IRubyObject[] args)
rb_str_rjust |
IRubyObject |
rstrip_bang()
rb_str_rstrip_bang |
IRubyObject |
rstrip()
rb_str_rstrip |
IRubyObject |
scan(IRubyObject arg,
Block block)
rb_str_scan |
void |
setUnicodeValue(java.lang.String newValue)
|
void |
setValue(ByteList value)
|
void |
setValue(java.lang.CharSequence value)
Mutator for internal string representation. |
IRubyObject |
slice_bang(IRubyObject[] args)
rb_str_slice_bang |
RubyArray |
split(IRubyObject[] args)
rb_str_split_m |
IRubyObject |
squeeze_bang(IRubyObject[] args)
rb_str_squeeze_bang |
IRubyObject |
squeeze(IRubyObject[] args)
rb_str_squeeze |
RubyString |
strDup()
rb_str_dup |
static byte[] |
stringToBytes(java.lang.String string)
|
static RubyString |
stringValue(IRubyObject object)
|
IRubyObject |
strip_bang()
rb_str_strip_bang |
IRubyObject |
strip()
rb_str_strip |
IRubyObject |
sub_bang(IRubyObject[] args,
Block block)
rb_str_sub_bang |
IRubyObject |
sub(IRubyObject[] args,
Block block)
rb_str_sub |
IRubyObject |
substr(int beg,
int len)
|
IRubyObject |
succ_bang()
|
IRubyObject |
succ()
|
RubyInteger |
sum(IRubyObject[] args)
|
IRubyObject |
swapcase_bang()
rb_str_swapcase_bang |
RubyString |
swapcase()
rb_str_swapcase |
IRubyObject |
to_f()
rb_str_to_f |
IRubyObject |
to_i(IRubyObject[] args)
rb_str_to_i |
IRubyObject |
to_s()
|
RubySymbol |
to_sym()
|
java.lang.String |
toString()
|
static byte[] |
toUTF(java.lang.String string)
|
IRubyObject |
tr_bang(IRubyObject src,
IRubyObject repl)
rb_str_tr_bang |
IRubyObject |
tr_s_bang(IRubyObject src,
IRubyObject repl)
rb_str_tr_s_bang |
IRubyObject |
tr_s(IRubyObject src,
IRubyObject repl)
rb_str_tr_s |
IRubyObject |
tr(IRubyObject src,
IRubyObject repl)
rb_str_tr |
static RubyString |
unmarshalFrom(UnmarshalStream input)
|
RubyArray |
unpack(IRubyObject obj)
|
IRubyObject |
upcase_bang()
rb_str_upcase_bang |
RubyString |
upcase()
rb_str_upcase |
IRubyObject |
upto(IRubyObject str,
Block block)
rb_str_upto_m |
IRubyObject |
upto(IRubyObject str,
boolean excl,
Block block)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final byte OP_PLUS_SWITCHVALUE
public static final byte OP_LT_SWITCHVALUE
public static final byte AREF_SWITCHVALUE
public static final byte ASET_SWITCHVALUE
public static final byte NIL_P_SWITCHVALUE
public static final byte EQUALEQUAL_SWITCHVALUE
public static final byte OP_GE_SWITCHVALUE
public static final byte OP_LSHIFT_SWITCHVALUE
public static final byte EMPTY_P_SWITCHVALUE
public static final byte TO_S_SWITCHVALUE
public static final byte TO_I_SWITCHVALUE
public static final byte TO_STR_SWITCHVALUE
public static final byte TO_SYM_SWITCHVALUE
public static final byte HASH_SWITCHVALUE
public static final byte OP_GT_SWITCHVALUE
public static final byte OP_TIMES_SWITCHVALUE
public static final byte OP_LE_SWITCHVALUE
public static final byte OP_SPACESHIP_SWITCHVALUE
public static final byte LENGTH_SWITCHVALUE
public static final byte MATCH_SWITCHVALUE
public static final byte EQQ_SWITCHVALUE
public static final byte INSPECT_SWITCHVALUE
Method Detail |
---|
public static RubyClass createStringClass(Ruby runtime)
public IRubyObject callMethod(ThreadContext context, RubyModule rubyclass, int methodIndex, java.lang.String name, IRubyObject[] args, CallType callType, Block block)
callMethod
in interface IRubyObject
callMethod
in class RubyObject
public final boolean eql(IRubyObject other)
eql
in interface IRubyObject
eql
in class RubyObject
public int getNativeTypeIndex()
RubyObject
getNativeTypeIndex
in interface IRubyObject
getNativeTypeIndex
in class RubyObject
public java.lang.Class getJavaClass()
IRubyObject
getJavaClass
in interface IRubyObject
getJavaClass
in class RubyObject
public RubyString convertToString()
convertToString
in interface IRubyObject
convertToString
in class RubyObject
public java.lang.String toString()
toString
in class RubyObject
public final RubyString strDup()
public final RubyString makeShared(int index, int len)
public final void modify()
public final void modify(int length)
public static java.lang.String bytesToString(byte[] bytes, int beg, int len)
public static java.lang.String byteListToString(ByteList bytes)
public static java.lang.String bytesToString(byte[] bytes)
public static byte[] stringToBytes(java.lang.String string)
public static boolean isDigit(int c)
public static boolean isUpper(int c)
public static boolean isLower(int c)
public static boolean isLetter(int c)
public static boolean isAlnum(int c)
public static boolean isPrint(int c)
public IRubyObject checkStringType()
RubyObject
checkStringType
in interface IRubyObject
checkStringType
in class RubyObject
public IRubyObject to_s()
to_s
in class RubyObject
public IRubyObject op_cmp(IRubyObject other)
public IRubyObject equal(IRubyObject other)
RubyObject
equal
in interface IRubyObject
equal
in class RubyObject
public IRubyObject op_plus(IRubyObject other)
public IRubyObject op_mul(IRubyObject other)
public IRubyObject format(IRubyObject arg)
public RubyFixnum hash()
hash
in class RubyObject
public int hashCode()
hashCode
in class RubyObject
public boolean equals(java.lang.Object other)
RubyObject
equals
in class RubyObject
public static RubyString objAsString(IRubyObject obj)
public int cmp(RubyString other)
public java.lang.String asSymbol()
asSymbol
in interface IRubyObject
asSymbol
in class RubyObject
public RubyString newString(java.lang.CharSequence s)
public RubyString newString(ByteList s)
public static RubyString newString(Ruby runtime, java.lang.CharSequence str)
public static RubyString newUnicodeString(Ruby runtime, java.lang.String str)
public static RubyString newString(Ruby runtime, RubyClass clazz, java.lang.CharSequence str)
public static RubyString newString(Ruby runtime, byte[] bytes)
public static RubyString newString(Ruby runtime, ByteList bytes)
public static RubyString newStringShared(Ruby runtime, RubyString orig)
public static RubyString newStringShared(Ruby runtime, ByteList bytes)
public static RubyString newString(Ruby runtime, byte[] bytes, int start, int length)
public IRubyObject doClone()
doClone
in class RubyObject
public RubyString cat(byte[] str)
public RubyString cat(byte[] str, int beg, int len)
public RubyString cat(ByteList str)
public RubyString cat(byte ch)
public RubyString replace(IRubyObject other)
public RubyString reverse()
public RubyString reverse_bang()
public static RubyString newInstance(IRubyObject recv, IRubyObject[] args, Block block)
public IRubyObject initialize(IRubyObject[] args, Block unusedBlock)
initialize
in class RubyObject
public IRubyObject casecmp(IRubyObject other)
public IRubyObject match(IRubyObject other)
match
in class RubyObject
public IRubyObject match2()
public IRubyObject match3(IRubyObject pattern)
pattern
- Regexp or Stringpublic IRubyObject capitalize()
public IRubyObject capitalize_bang()
public IRubyObject op_ge(IRubyObject other)
public IRubyObject op_gt(IRubyObject other)
public IRubyObject op_le(IRubyObject other)
public IRubyObject op_lt(IRubyObject other)
public IRubyObject eql_p(IRubyObject other)
public RubyString upcase()
public IRubyObject upcase_bang()
public RubyString downcase()
public IRubyObject downcase_bang()
public RubyString swapcase()
public IRubyObject swapcase_bang()
public IRubyObject dump()
public IRubyObject insert(IRubyObject indexArg, IRubyObject stringArg)
public IRubyObject inspect()
inspect
in interface IRubyObject
inspect
in class RubyObject
public RubyFixnum length()
public RubyBoolean empty()
public RubyString append(IRubyObject other)
public RubyString concat(IRubyObject other)
public RubyString crypt(IRubyObject other)
public static RubyString stringValue(IRubyObject object)
public IRubyObject sub(IRubyObject[] args, Block block)
public IRubyObject sub_bang(IRubyObject[] args, Block block)
public IRubyObject gsub(IRubyObject[] args, Block block)
public IRubyObject gsub_bang(IRubyObject[] args, Block block)
public IRubyObject index(IRubyObject[] args)
public IRubyObject rindex(IRubyObject[] args)
public IRubyObject substr(int beg, int len)
public IRubyObject replace(int beg, int len, RubyString replaceWith)
public IRubyObject aref(IRubyObject[] args)
public IRubyObject aset(IRubyObject[] args)
public IRubyObject slice_bang(IRubyObject[] args)
public IRubyObject succ()
public IRubyObject succ_bang()
public IRubyObject upto(IRubyObject str, Block block)
public IRubyObject upto(IRubyObject str, boolean excl, Block block)
public RubyBoolean include(IRubyObject obj)
public IRubyObject to_i(IRubyObject[] args)
public IRubyObject oct()
public IRubyObject hex()
public IRubyObject to_f()
public RubyArray split(IRubyObject[] args)
public IRubyObject scan(IRubyObject arg, Block block)
public IRubyObject ljust(IRubyObject[] args)
public IRubyObject rjust(IRubyObject[] args)
public IRubyObject center(IRubyObject[] args)
public IRubyObject chop()
public IRubyObject chop_bang()
public RubyString chomp(IRubyObject[] args)
public IRubyObject chomp_bang(IRubyObject[] args)
args
- See method description.public IRubyObject lstrip()
public IRubyObject lstrip_bang()
public IRubyObject rstrip()
public IRubyObject rstrip_bang()
public IRubyObject strip()
public IRubyObject strip_bang()
public IRubyObject count(IRubyObject[] args)
public IRubyObject delete(IRubyObject[] args)
public IRubyObject delete_bang(IRubyObject[] args)
public IRubyObject squeeze(IRubyObject[] args)
public IRubyObject squeeze_bang(IRubyObject[] args)
public IRubyObject tr(IRubyObject src, IRubyObject repl)
public IRubyObject tr_bang(IRubyObject src, IRubyObject repl)
public IRubyObject tr_s(IRubyObject src, IRubyObject repl)
public IRubyObject tr_s_bang(IRubyObject src, IRubyObject repl)
public IRubyObject each_line(IRubyObject[] args, Block block)
public RubyString each_byte(Block block)
public RubySymbol intern()
public RubySymbol to_sym()
public RubyInteger sum(IRubyObject[] args)
public static RubyString unmarshalFrom(UnmarshalStream input) throws java.io.IOException
java.io.IOException
public RubyArray unpack(IRubyObject obj)
Pack.unpack(org.jruby.Ruby, org.jruby.util.ByteList, org.jruby.util.ByteList)
public void setValue(java.lang.CharSequence value)
value
- The new java.lang.String this RubyString should encapsulatepublic void setValue(ByteList value)
public java.lang.CharSequence getValue()
public java.lang.String getUnicodeValue()
public static byte[] toUTF(java.lang.String string)
public void setUnicodeValue(java.lang.String newValue)
public byte[] getBytes()
public ByteList getByteList()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |