public class RubyString extends RubyObject implements EncodingCapable, MarshalEncoding, CodeRangeable
RubyObject.DataRubyBasicObject.FinalizerFIELD_ALLOCATED_CLASSES, FIELD_ALLOCATORS, IVAR_INSPECTING_OBJECT_ALLOCATOR, OBJECT_ALLOCATOR, OBJECT_VAR0_ALLOCATOR, OBJECT_VAR1_ALLOCATOR, OBJECT_VAR2_ALLOCATOR, OBJECT_VAR3_ALLOCATOR, OBJECT_VAR4_ALLOCATOR, OBJECT_VAR5_ALLOCATOR, OBJECT_VAR6_ALLOCATOR, OBJECT_VAR7_ALLOCATOR, OBJECT_VAR8_ALLOCATOR, OBJECT_VAR9_ALLOCATOR, REIFYING_OBJECT_ALLOCATORALL_F, BASICOBJECT_ALLOCATOR, COMPARE_BY_IDENTITY_F, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, IS_OVERLAID_F, metaClass, NEVER, NIL_F, REFINED_MODULE_F, STAMP_OFFSET, TAINTED_F, UNDEF, UNTRUST_F, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F, USER8_F, USER9_F, USERA_F, VAR_TABLE_OFFSET, varTable, varTableStampNULL_ARRAY| Modifier | Constructor and Description |
|---|---|
|
RubyString(Ruby runtime,
RubyClass rubyClass) |
|
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) |
|
RubyString(Ruby runtime,
RubyClass rubyClass,
org.jruby.util.ByteList value,
org.jcodings.Encoding encoding,
boolean objectSpace) |
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,
CharSequence value) |
|
RubyString(Ruby runtime,
RubyClass rubyClass,
CharSequence value,
org.jcodings.Encoding enc) |
attachToObjectSpace, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, convertToType, createObjectClass, eqlInternal, equalInternal, initialize, inspect, op_eqq, puts, specificEvaladdFinalizer, anyToString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkCallMethod, checkFrozen, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToInteger, convertToInteger, copyInstanceVariablesInto, copySpecialInstanceVariables, createBasicObjectClass, dataGetStruct, dataGetStructChecked, dataWrapStruct, display, ensureInstanceVariablesSettable, eql_p, equal_p, equal_p19, evalUnder, extend, fastGetInstanceVariable, fastGetInternalVariable, fastHasInstanceVariable, fastHasInternalVariable, fastSetInstanceVariable, fastSetInternalVariable, frozen_p, getFFIHandle, getFlag, getInstanceEvalClass, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getMetaClass, getNativeHandle, getNativeTypeIndex, getObjectId, getRuntime, getSingletonClass, getSingletonClassClone, getType, getVariable, getVariableCount, getVariableList, getVariableNameList, hashyInspect, hasInstanceVariable, hasInternalVariable, hasVariables, id, infectBy, inspectHashCode, instance_eval, instance_eval, instance_eval, instance_eval, instance_eval19, instance_eval19, instance_eval19, instance_eval19, instance_exec, instance_exec19, instance_of_p, instance_variable_defined_p, instance_variable_get, instance_variable_set, instance_variables, instance_variables19, isBuiltin, isClass, isFalse, isFrozen, isImmediate, isModule, isNil, isSpecialConst, isTaint, isTrue, isUntrusted, kind_of_p, makeMetaClass, method_missing19, method, method19, methods, methods, methods19, nil_p, OBJ_INIT_COPY, objInitCopy, op_equal_19, op_not_equal, op_not_match, op_not, private_methods, private_methods19, protected_methods, protected_methods19, public_methods, public_methods19, rbClone, rbInspect, remove_instance_variable, removeFinalizers, removeInstanceVariable, removeInternalVariable, respond_to_p, respond_to_p, respond_to_p19, respond_to_p19, respondsTo, respondsToMissing, respondsToMissing, send, send, send, send, send, send19, send19, send19, send19, setFFIHandle, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setNativeHandle, setTaint, setUntrusted, setVariable, singleton_method_added19, singleton_method_removed19, singleton_method_undefined19, singleton_methods, specificEval, specificEval, specificEval, specificEval, syncVariables, syncVariables, taint, taint, tainted_p, testFrozen, testFrozen, to_a, trust, type_deprecated, type, untaint, untrust, untrusted_p, validateInstanceVariable, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableRemove, variableTableStore, variableTableSync, yieldUnder, yieldUnderpublic RubyString(Ruby runtime, RubyClass rubyClass, CharSequence value)
public RubyString(Ruby runtime, RubyClass rubyClass, CharSequence value, org.jcodings.Encoding enc)
public RubyString(Ruby runtime, RubyClass rubyClass, org.jruby.util.ByteList value, boolean objectSpace)
public RubyString(Ruby runtime, RubyClass rubyClass, org.jruby.util.ByteList value, org.jcodings.Encoding encoding, boolean objectSpace)
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, org.jcodings.Encoding enc)
public org.jcodings.Encoding getEncoding()
getEncoding in interface EncodingCapablepublic void setEncoding(org.jcodings.Encoding encoding)
setEncoding in interface EncodingCapablepublic boolean shouldMarshalEncoding()
shouldMarshalEncoding in interface MarshalEncodingpublic org.jcodings.Encoding getMarshalEncoding()
getMarshalEncoding in interface MarshalEncodingpublic void associateEncoding(org.jcodings.Encoding enc)
public final void setEncodingAndCodeRange(org.jcodings.Encoding enc,
int cr)
public final org.jcodings.Encoding toEncoding(Ruby runtime)
public final int getCodeRange()
getCodeRange in interface CodeRangeablepublic final void setCodeRange(int codeRange)
setCodeRange in interface CodeRangeablepublic final void clearCodeRange()
clearCodeRange in interface CodeRangeablepublic final void keepCodeRange()
keepCodeRange in interface CodeRangeablepublic final boolean isCodeRangeAsciiOnly()
public final boolean isAsciiOnly()
public final boolean isCodeRangeValid()
isCodeRangeValid in interface CodeRangeablepublic final boolean isCodeRangeBroken()
public final boolean isBrokenString()
public final int scanForCodeRange()
scanForCodeRange in interface CodeRangeablepublic final org.jcodings.Encoding checkEncoding(RubyString other)
public final org.jcodings.Encoding checkEncoding(CodeRangeable other)
checkEncoding in interface CodeRangeablepublic final int strLength()
public final boolean eql(IRubyObject other)
eql in interface IRubyObjecteql in class RubyBasicObject@Deprecated public RubyString newString(CharSequence s)
@Deprecated public RubyString newString(org.jruby.util.ByteList s)
@Deprecated public static RubyString newString(Ruby runtime, RubyClass clazz, CharSequence str)
public static RubyString newStringLight(Ruby runtime, org.jruby.util.ByteList bytes)
public static RubyString newStringLight(Ruby runtime, int size)
public static RubyString newStringLight(Ruby runtime, int size, org.jcodings.Encoding encoding)
public static RubyString newString(Ruby runtime, CharSequence str)
public static RubyString newString(Ruby runtime, String str)
public static RubyString newString(Ruby runtime, String str, org.jcodings.Encoding encoding)
public static RubyString newUSASCIIString(Ruby runtime, String str)
public static RubyString newString(Ruby runtime, byte[] bytes)
public static RubyString newString(Ruby runtime, byte[] bytes, int start, int length)
public static RubyString newString(Ruby runtime, byte[] bytes, int start, int length, org.jcodings.Encoding encoding)
public static RubyString newString(Ruby runtime, org.jruby.util.ByteList bytes)
public static RubyString newString(Ruby runtime, org.jruby.util.ByteList bytes, int coderange)
public static RubyString newString(Ruby runtime, org.jruby.util.ByteList bytes, org.jcodings.Encoding encoding)
public static RubyString newUnicodeString(Ruby runtime, String str)
public static RubyString newUTF8String(Ruby runtime, String str)
public static RubyString newUTF16String(Ruby runtime, String str)
public static RubyString newUnicodeString(Ruby runtime, CharSequence str)
public static RubyString newUTF8String(Ruby runtime, CharSequence str)
public static RubyString newUTF16String(Ruby runtime, CharSequence str)
public static RubyString newInternalFromJavaExternal(Ruby runtime, String str)
runtime - str - public static RubyString newStringShared(Ruby runtime, RubyString orig)
public static RubyString newStringShared(Ruby runtime, org.jruby.util.ByteList bytes)
public static RubyString newStringShared(Ruby runtime, org.jruby.util.ByteList bytes, org.jcodings.Encoding encoding)
public static RubyString newStringShared(Ruby runtime, org.jruby.util.ByteList bytes, int codeRange)
public static RubyString newStringShared(Ruby runtime, RubyClass clazz, org.jruby.util.ByteList bytes)
public static RubyString newStringShared(Ruby runtime, RubyClass clazz, org.jruby.util.ByteList bytes, org.jcodings.Encoding encoding)
public static RubyString newStringShared(Ruby runtime, byte[] bytes)
public static RubyString newStringShared(Ruby runtime, byte[] bytes, org.jcodings.Encoding encoding)
public static RubyString newStringShared(Ruby runtime, byte[] bytes, int start, int length)
public static RubyString newStringShared(Ruby runtime, byte[] bytes, int start, int length, org.jcodings.Encoding encoding)
public static RubyString newEmptyString(Ruby runtime)
public static RubyString newAllocatedString(Ruby runtime, RubyClass metaClass)
public static RubyString newEmptyString(Ruby runtime, RubyClass metaClass)
public static RubyString newStringNoCopy(Ruby runtime, org.jruby.util.ByteList bytes)
public static RubyString newStringNoCopy(Ruby runtime, RubyClass clazz, org.jruby.util.ByteList bytes)
public static RubyString newStringNoCopy(Ruby runtime, byte[] bytes, int start, int length)
public static RubyString newStringNoCopy(Ruby runtime, byte[] bytes)
public boolean independent()
public RubyString makeIndependent()
public RubyString export(ThreadContext context)
public static RubyString newEmptyString(Ruby runtime, RubyClass metaClass, org.jcodings.Encoding enc)
public static RubyString newEmptyString(Ruby runtime, org.jcodings.Encoding enc)
public static RubyString newStringNoCopy(Ruby runtime, RubyClass clazz, org.jruby.util.ByteList bytes, org.jcodings.Encoding enc, int cr)
public static RubyString newStringNoCopy(Ruby runtime, org.jruby.util.ByteList bytes, org.jcodings.Encoding enc, int cr)
public static RubyString newUsAsciiStringNoCopy(Ruby runtime, org.jruby.util.ByteList bytes)
public static RubyString newUsAsciiStringShared(Ruby runtime, org.jruby.util.ByteList bytes)
public static RubyString newUsAsciiStringShared(Ruby runtime, byte[] bytes, int start, int length)
public ClassIndex getNativeClassIndex()
RubyObjectgetNativeClassIndex in interface CoreObjectTypegetNativeClassIndex in class RubyObjectClassIndexpublic Class getJavaClass()
RubyBasicObjectgetJavaClass in interface IRubyObjectgetJavaClass in class RubyBasicObjectpublic RubyString convertToString()
RubyBasicObjectconvertToString in interface IRubyObjectconvertToString in class RubyBasicObjectpublic String toString()
RubyObjecttoString in class RubyObjectpublic String decodeString()
public IRubyObject dup()
dup in interface IRubyObjectdup in class RubyBasicObjectpublic IRubyObject dupFrozen()
public final RubyString strDup(Ruby runtime)
public final RubyString makeSharedString(Ruby runtime, int index, int len)
public RubyString makeSharedString19(Ruby runtime, int index, int len)
public final RubyString makeShared(Ruby runtime, int index, int len)
public final RubyString makeShared(Ruby runtime, RubyClass meta, int index, int len)
public final RubyString makeShared19(Ruby runtime, int index, int len)
public final RubyString makeShared19(Ruby runtime, RubyClass meta, int index, int len)
public final void setByteListShared()
public final void modifyCheck()
public void modifyCheck(byte[] b,
int len)
public final void modify()
modify in interface ByteListHolderpublic final void modify19()
public void modifyAndKeepCodeRange()
modifyAndKeepCodeRange in interface CodeRangeablepublic final void modify(int length)
modify in interface ByteListHolderpublic final void modifyExpand(int length)
public void setReadLength(int length)
public RubyString newFrozen()
public final void resize(int length)
public final void view(org.jruby.util.ByteList bytes)
public static String bytesToString(byte[] bytes, int beg, int len)
public static String byteListToString(org.jruby.util.ByteList bytes)
public static String bytesToString(byte[] bytes)
public static byte[] stringToBytes(String string)
public RubyString asString()
RubyBasicObjectRubyBasicObject.anyToString() is used
instead.asString in interface IRubyObjectasString in class RubyBasicObjectpublic IRubyObject checkStringType()
RubyBasicObjectcheckStringType in interface IRubyObjectcheckStringType in class RubyBasicObjectpublic IRubyObject checkStringType19()
RubyBasicObjectcheckStringType19 in interface IRubyObjectcheckStringType19 in class RubyBasicObjectpublic static IRubyObject try_convert(ThreadContext context, IRubyObject recv, IRubyObject str)
public IRubyObject to_s()
RubyBasicObjectto_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.''to_s in class RubyBasicObjectpublic final int compareTo(IRubyObject other)
RubyBasicObjectcompareTo in interface Comparable<IRubyObject>compareTo in class RubyBasicObjectother - another IRubyObjectpublic IRubyObject op_cmp(ThreadContext context, IRubyObject other)
op_cmp in class RubyBasicObjectpublic IRubyObject op_equal(ThreadContext context, IRubyObject other)
op_equal in interface IRubyObjectop_equal in class RubyBasicObjectpublic IRubyObject op_equal19(ThreadContext context, IRubyObject other)
public IRubyObject op_plus(ThreadContext context, IRubyObject _str)
public IRubyObject op_plus19(ThreadContext context, IRubyObject _str)
public IRubyObject op_mul(ThreadContext context, IRubyObject other)
public IRubyObject op_mul19(ThreadContext context, IRubyObject other)
public IRubyObject op_format(ThreadContext context, IRubyObject arg)
public RubyFixnum hash()
RubyBasicObjecthash in class RubyBasicObjectpublic int hashCode()
RubyObjecthashCode in class RubyObjectpublic int strHashCode(Ruby runtime)
runtime - public int unseededStrHashCode(Ruby runtime)
runtime - public boolean equals(Object other)
RubyObjectequals in class RubyObjectpublic static RubyString objAsString(ThreadContext context, IRubyObject obj)
public final int op_cmp(RubyString other)
public String asJavaString()
asJavaString in interface IRubyObjectasJavaString in class RubyBasicObjectpublic IRubyObject doClone()
public final RubyString cat(byte[] str)
public final RubyString cat(byte[] str, int beg, int len)
public final RubyString cat19(RubyString str2)
public final int cat19(org.jruby.util.ByteList other,
int codeRange)
public final RubyString cat(RubyString str)
public final RubyString cat(org.jruby.util.ByteList str)
public final RubyString cat(byte ch)
public final RubyString cat(int ch)
public final RubyString cat(int code, org.jcodings.Encoding enc)
public final int cat(byte[] bytes,
int p,
int len,
org.jcodings.Encoding enc)
public final RubyString catAscii(byte[] bytes, int ptr, int ptrLen)
public IRubyObject replace(IRubyObject other)
public RubyString initialize_copy(IRubyObject other)
RubyBasicObjectinitialize_copy in class RubyBasicObjectpublic RubyString replace19(IRubyObject other)
public RubyString clear()
public IRubyObject reverse(ThreadContext context)
public IRubyObject reverse19(ThreadContext context)
public RubyString reverse_bang(ThreadContext context)
public RubyString reverse_bang19(ThreadContext context)
public static RubyString newInstance(IRubyObject recv, IRubyObject[] args, Block block)
public IRubyObject initialize(ThreadContext context)
initialize in class RubyObjectpublic IRubyObject initialize(ThreadContext context, IRubyObject arg0)
public IRubyObject initialize19(ThreadContext context)
initialize19 in class RubyBasicObjectpublic IRubyObject initialize19(ThreadContext context, IRubyObject arg0)
public IRubyObject casecmp(ThreadContext context, IRubyObject other)
public IRubyObject casecmp19(ThreadContext context, IRubyObject other)
public IRubyObject op_match(ThreadContext context, IRubyObject other)
op_match in class RubyBasicObjectpublic IRubyObject op_match19(ThreadContext context, IRubyObject other)
op_match19 in class RubyBasicObjectpublic IRubyObject match(ThreadContext context, IRubyObject pattern)
pattern - Regexp or Stringpublic IRubyObject match19(ThreadContext context, IRubyObject pattern, Block block)
public IRubyObject match19(ThreadContext context, IRubyObject[] args, Block block)
public IRubyObject capitalize(ThreadContext context)
public IRubyObject capitalize_bang(ThreadContext context)
public IRubyObject capitalize19(ThreadContext context)
public IRubyObject capitalize_bang19(ThreadContext context)
public IRubyObject op_ge(ThreadContext context, IRubyObject other)
public IRubyObject op_ge19(ThreadContext context, IRubyObject other)
public IRubyObject op_gt(ThreadContext context, IRubyObject other)
public IRubyObject op_gt19(ThreadContext context, IRubyObject other)
public IRubyObject op_le(ThreadContext context, IRubyObject other)
public IRubyObject op_le19(ThreadContext context, IRubyObject other)
public IRubyObject op_lt(ThreadContext context, IRubyObject other)
public IRubyObject op_lt19(ThreadContext context, IRubyObject other)
public IRubyObject str_eql_p(ThreadContext context, IRubyObject other)
public IRubyObject str_eql_p19(ThreadContext context, IRubyObject other)
public RubyString upcase(ThreadContext context)
public IRubyObject upcase_bang(ThreadContext context)
public RubyString upcase19(ThreadContext context)
public IRubyObject upcase_bang19(ThreadContext context)
public RubyString downcase(ThreadContext context)
public IRubyObject downcase_bang(ThreadContext context)
public RubyString downcase19(ThreadContext context)
public IRubyObject downcase_bang19(ThreadContext context)
public RubyString swapcase(ThreadContext context)
public IRubyObject swapcase_bang(ThreadContext context)
public RubyString swapcase19(ThreadContext context)
public IRubyObject swapcase_bang19(ThreadContext context)
public IRubyObject dump()
public IRubyObject dump19()
public IRubyObject insert(ThreadContext context, IRubyObject indexArg, IRubyObject stringArg)
public IRubyObject insert19(ThreadContext context, IRubyObject indexArg, IRubyObject stringArg)
public IRubyObject inspect()
inspect in interface IRubyObjectinspect in class RubyBasicObjectpublic IRubyObject inspect19()
public static IRubyObject inspect19(Ruby runtime, org.jruby.util.ByteList byteList)
public int size()
public RubyFixnum length()
public RubyFixnum length19()
public RubyFixnum bytesize()
public RubyBoolean empty_p(ThreadContext context)
public boolean isEmpty()
public RubyString append(IRubyObject other)
public RubyString append19(IRubyObject other)
public RubyString concat(IRubyObject other)
public RubyString concat19(ThreadContext context, IRubyObject other)
public IRubyObject prepend(ThreadContext context, IRubyObject other)
public RubyString crypt(ThreadContext context, IRubyObject other)
public static RubyString stringValue(IRubyObject object)
public IRubyObject sub(ThreadContext context, IRubyObject arg0, Block block)
public IRubyObject sub(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
public IRubyObject sub_bang(ThreadContext context, IRubyObject arg0, Block block)
public IRubyObject sub_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
public IRubyObject sub19(ThreadContext context, IRubyObject arg0, Block block)
public IRubyObject sub19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
public IRubyObject sub_bang19(ThreadContext context, IRubyObject arg0, Block block)
public IRubyObject sub_bang19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
public IRubyObject gsub(ThreadContext context, IRubyObject arg0, Block block)
public IRubyObject gsub(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
public IRubyObject gsub_bang(ThreadContext context, IRubyObject arg0, Block block)
public IRubyObject gsub_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
public IRubyObject gsub19(ThreadContext context, IRubyObject arg0, Block block)
public IRubyObject gsub19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
public IRubyObject gsub_bang19(ThreadContext context, IRubyObject arg0, Block block)
public IRubyObject gsub_bang19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
public IRubyObject index(ThreadContext context, IRubyObject arg0)
public IRubyObject index(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
public IRubyObject index19(ThreadContext context, IRubyObject arg0)
public IRubyObject index19(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
public IRubyObject rindex(ThreadContext context, IRubyObject arg0)
public IRubyObject rindex(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
public IRubyObject rindex19(ThreadContext context, IRubyObject arg0)
public IRubyObject rindex19(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
@Deprecated public final IRubyObject substr(int beg, int len)
public final IRubyObject substr(Ruby runtime, int beg, int len)
public final IRubyObject substr19(Ruby runtime, int beg, int len)
public IRubyObject op_aref(ThreadContext context, IRubyObject arg1, IRubyObject arg2)
public IRubyObject op_aref(ThreadContext context, IRubyObject arg)
public IRubyObject op_aref19(ThreadContext context, IRubyObject arg1, IRubyObject arg2)
public IRubyObject op_aref19(ThreadContext context, IRubyObject arg)
public IRubyObject byteslice(ThreadContext context, IRubyObject arg1, IRubyObject arg2)
public IRubyObject byteslice(ThreadContext context, IRubyObject arg)
public IRubyObject op_aset(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
public IRubyObject op_aset(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)
public IRubyObject op_aset19(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
public IRubyObject op_aset19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)
public IRubyObject slice_bang(ThreadContext context, IRubyObject arg0)
public IRubyObject slice_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
public IRubyObject slice_bang19(ThreadContext context, IRubyObject arg0)
public IRubyObject slice_bang19(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
public IRubyObject succ(ThreadContext context)
public IRubyObject succ_bang()
public IRubyObject succ19(ThreadContext context)
public IRubyObject succ_bang19()
public IRubyObject upto19(ThreadContext context, IRubyObject end, Block block)
public IRubyObject upto19(ThreadContext context, IRubyObject end, IRubyObject excl, Block block)
public RubyBoolean include_p(ThreadContext context, IRubyObject obj)
public RubyBoolean include_p19(ThreadContext context, IRubyObject obj)
public IRubyObject chr(ThreadContext context)
public IRubyObject getbyte(ThreadContext context, IRubyObject index)
public IRubyObject setbyte(ThreadContext context, IRubyObject index, IRubyObject val)
public IRubyObject to_i()
public IRubyObject to_i(IRubyObject arg0)
public IRubyObject to_i19()
public IRubyObject to_i19(IRubyObject arg0)
public IRubyObject stringToInum(int base, boolean badcheck)
public IRubyObject stringToInum19(int base, boolean badcheck)
public IRubyObject oct(ThreadContext context)
public IRubyObject oct19(ThreadContext context)
public IRubyObject hex(ThreadContext context)
public IRubyObject hex19(ThreadContext context)
public IRubyObject to_f()
public IRubyObject to_f19()
public RubyArray split(ThreadContext context)
public RubyArray split(ThreadContext context, IRubyObject arg0)
public RubyArray split(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
public RubyArray split19(ThreadContext context)
public RubyArray split19(ThreadContext context, IRubyObject arg0)
public RubyArray split19(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
public RubyArray split19(IRubyObject spat, ThreadContext context, boolean useBackref)
public IRubyObject scan(ThreadContext context, IRubyObject arg, Block block)
public IRubyObject scan19(ThreadContext context, IRubyObject pat, Block block)
public IRubyObject start_with_p(ThreadContext context)
public IRubyObject start_with_p(ThreadContext context, IRubyObject arg)
public IRubyObject start_with_p(ThreadContext context, IRubyObject[] args)
public IRubyObject end_with_p(ThreadContext context)
public IRubyObject end_with_p(ThreadContext context, IRubyObject arg)
public IRubyObject end_with_p(ThreadContext context, IRubyObject[] args)
public IRubyObject ljust(IRubyObject arg0)
public IRubyObject ljust(IRubyObject arg0, IRubyObject arg1)
public IRubyObject ljust19(IRubyObject arg0)
public IRubyObject ljust19(IRubyObject arg0, IRubyObject arg1)
public IRubyObject rjust(IRubyObject arg0)
public IRubyObject rjust(IRubyObject arg0, IRubyObject arg1)
public IRubyObject rjust19(IRubyObject arg0)
public IRubyObject rjust19(IRubyObject arg0, IRubyObject arg1)
public IRubyObject center(IRubyObject arg0)
public IRubyObject center(IRubyObject arg0, IRubyObject arg1)
public IRubyObject center19(IRubyObject arg0)
public IRubyObject center19(IRubyObject arg0, IRubyObject arg1)
public IRubyObject partition(ThreadContext context, Block block)
public IRubyObject partition(ThreadContext context, IRubyObject arg, Block block)
public IRubyObject rpartition(ThreadContext context, IRubyObject arg)
public IRubyObject chop(ThreadContext context)
public IRubyObject chop_bang(ThreadContext context)
public IRubyObject chop19(ThreadContext context)
public IRubyObject chop_bang19(ThreadContext context)
public RubyString chomp(ThreadContext context)
public RubyString chomp(ThreadContext context, IRubyObject arg0)
public IRubyObject chomp_bang(ThreadContext context)
public IRubyObject chomp_bang(ThreadContext context, IRubyObject arg0)
public RubyString chomp19(ThreadContext context)
public RubyString chomp19(ThreadContext context, IRubyObject arg0)
public IRubyObject chomp_bang19(ThreadContext context)
public IRubyObject chomp_bang19(ThreadContext context, IRubyObject arg0)
public IRubyObject lstrip(ThreadContext context)
public IRubyObject lstrip_bang(ThreadContext context)
public IRubyObject lstrip19(ThreadContext context)
public IRubyObject lstrip_bang19(ThreadContext context)
public IRubyObject rstrip(ThreadContext context)
public IRubyObject rstrip_bang(ThreadContext context)
public IRubyObject rstrip19(ThreadContext context)
public IRubyObject rstrip_bang19(ThreadContext context)
public IRubyObject strip(ThreadContext context)
public IRubyObject strip_bang(ThreadContext context)
public IRubyObject strip19(ThreadContext context)
public IRubyObject strip_bang19(ThreadContext context)
public IRubyObject count(ThreadContext context)
public IRubyObject count(ThreadContext context, IRubyObject arg)
public IRubyObject count(ThreadContext context, IRubyObject[] args)
public IRubyObject count19(ThreadContext context)
public IRubyObject count19(ThreadContext context, IRubyObject arg)
public IRubyObject count19(ThreadContext context, IRubyObject[] args)
public IRubyObject delete(ThreadContext context)
public IRubyObject delete(ThreadContext context, IRubyObject arg)
public IRubyObject delete(ThreadContext context, IRubyObject[] args)
public IRubyObject delete_bang(ThreadContext context)
public IRubyObject delete_bang(ThreadContext context, IRubyObject arg)
public IRubyObject delete_bang(ThreadContext context, IRubyObject[] args)
public IRubyObject delete19(ThreadContext context)
public IRubyObject delete19(ThreadContext context, IRubyObject arg)
public IRubyObject delete19(ThreadContext context, IRubyObject[] args)
public IRubyObject delete_bang19(ThreadContext context)
public IRubyObject delete_bang19(ThreadContext context, IRubyObject arg)
public IRubyObject delete_bang19(ThreadContext context, IRubyObject[] args)
public IRubyObject squeeze(ThreadContext context)
public IRubyObject squeeze(ThreadContext context, IRubyObject arg)
public IRubyObject squeeze(ThreadContext context, IRubyObject[] args)
public IRubyObject squeeze_bang(ThreadContext context)
public IRubyObject squeeze_bang(ThreadContext context, IRubyObject arg)
public IRubyObject squeeze_bang(ThreadContext context, IRubyObject[] args)
public IRubyObject squeeze19(ThreadContext context)
public IRubyObject squeeze19(ThreadContext context, IRubyObject arg)
public IRubyObject squeeze19(ThreadContext context, IRubyObject[] args)
public IRubyObject squeeze_bang19(ThreadContext context)
public IRubyObject squeeze_bang19(ThreadContext context, IRubyObject arg)
public IRubyObject squeeze_bang19(ThreadContext context, IRubyObject[] args)
public IRubyObject tr(ThreadContext context, IRubyObject src, IRubyObject repl)
public IRubyObject tr_bang(ThreadContext context, IRubyObject src, IRubyObject repl)
public IRubyObject tr19(ThreadContext context, IRubyObject src, IRubyObject repl)
public IRubyObject tr_bang19(ThreadContext context, IRubyObject src, IRubyObject repl)
public IRubyObject tr_s(ThreadContext context, IRubyObject src, IRubyObject repl)
public IRubyObject tr_s_bang(ThreadContext context, IRubyObject src, IRubyObject repl)
public IRubyObject tr_s19(ThreadContext context, IRubyObject src, IRubyObject repl)
public IRubyObject tr_s_bang19(ThreadContext context, IRubyObject src, IRubyObject repl)
public IRubyObject each_line(ThreadContext context, Block block)
public IRubyObject each_line(ThreadContext context, IRubyObject arg, Block block)
public IRubyObject each_lineCommon(ThreadContext context, IRubyObject sep, Block block)
public IRubyObject each_line19(ThreadContext context, Block block)
public IRubyObject each_line19(ThreadContext context, IRubyObject arg, Block block)
public IRubyObject lines(ThreadContext context, Block block)
public IRubyObject lines(ThreadContext context, IRubyObject arg, Block block)
public IRubyObject lines20(ThreadContext context, Block block)
public IRubyObject lines20(ThreadContext context, IRubyObject arg, Block block)
public RubyString each_byte(ThreadContext context, Block block)
public IRubyObject each_byte19(ThreadContext context, Block block)
public IRubyObject bytes(ThreadContext context, Block block)
public IRubyObject each_char19(ThreadContext context, Block block)
public IRubyObject chars19(ThreadContext context, Block block)
public IRubyObject each_codepoint(ThreadContext context, Block block)
public IRubyObject codepoints(ThreadContext context, Block block)
public RubySymbol intern()
public RubySymbol intern19()
public IRubyObject ord(ThreadContext context)
public IRubyObject sum(ThreadContext context)
public IRubyObject sum(ThreadContext context, IRubyObject arg)
public IRubyObject sumCommon(ThreadContext context, long bits)
public IRubyObject to_c(ThreadContext context)
public IRubyObject to_r(ThreadContext context)
public static RubyString unmarshalFrom(UnmarshalStream input) throws IOException
IOExceptionpublic RubyArray unpack(IRubyObject obj)
public void empty()
public IRubyObject encoding(ThreadContext context)
public IRubyObject encode_bang(ThreadContext context, IRubyObject arg0)
public IRubyObject encode_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
public IRubyObject encode_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)
public IRubyObject encode_bang(ThreadContext context, IRubyObject[] args)
public IRubyObject encode(ThreadContext context)
public IRubyObject encode(ThreadContext context, IRubyObject arg)
public IRubyObject encode(ThreadContext context, IRubyObject toEncoding, IRubyObject arg)
public IRubyObject encode(ThreadContext context, IRubyObject toEncoding, IRubyObject forcedEncoding, IRubyObject opts)
public IRubyObject force_encoding(ThreadContext context, IRubyObject enc)
public IRubyObject valid_encoding_p(ThreadContext context)
public IRubyObject ascii_only_p(ThreadContext context)
public IRubyObject b(ThreadContext context)
public IRubyObject scrub(ThreadContext context, Block block)
public IRubyObject scrub(ThreadContext context, IRubyObject repl, Block block)
public IRubyObject scrub_bang(ThreadContext context, Block block)
public IRubyObject scrub_bang(ThreadContext context, IRubyObject repl, Block block)
public IRubyObject freeze(ThreadContext context)
RubyBasicObjectTypeError will be raised if modification is attempted.
There is no way to unfreeze a frozen object. See also
Object#frozen?.
a = [ "a", "b", "c" ]
a.freeze
a << "z"
produces:
prog.rb:3:in `<<': can't modify frozen array (TypeError)
from prog.rb:3freeze in class RubyBasicObjectpublic void setValue(CharSequence value)
value - The new java.lang.String this RubyString should encapsulatepublic void setValue(org.jruby.util.ByteList value)
public CharSequence getValue()
public byte[] getBytes()
public org.jruby.util.ByteList getByteList()
getByteList in interface ByteListHolderpublic String getUnicodeValue()
public static org.jruby.util.ByteList encodeBytelist(CharSequence value, org.jcodings.Encoding encoding)
public Object toJava(Class target)
IRubyObjecttoJava in interface IRubyObjecttoJava in class RubyBasicObjecttarget - The target type to which the object should be converted.IRubyObject.toJava(java.lang.Class)public IRubyObject strScrub(ThreadContext context, IRubyObject repl, Block block)
public int rbStrOffset(int pos)
@Deprecated public final RubyString strDup()
@Deprecated public final void modify19(int length)
@Deprecated public RubyArray split19(ThreadContext context, IRubyObject arg0, boolean useBackref)
Copyright © 2001-2015 JRuby. All Rights Reserved.