public class RubyString extends RubyObject implements java.lang.CharSequence, EncodingCapable, MarshalEncoding, CodeRangeable
| Modifier and Type | Class and Description |
|---|---|
static class |
RubyString.EmptyByteListHolder
Encoding aware String construction routines for 1.9
|
RubyObject.DataRubyBasicObject.Finalizer| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEBUG_INFO_FIELD |
static RubyString[] |
NULL_ARRAY |
IVAR_INSPECTING_OBJECT_ALLOCATOR, OBJECT_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, 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, varTableStamp| Modifier | Constructor and Description |
|---|---|
|
RubyString(Ruby runtime,
RubyClass rubyClass) |
|
RubyString(Ruby runtime,
RubyClass rubyClass,
byte[] value) |
|
RubyString(Ruby runtime,
RubyClass rubyClass,
ByteList value) |
|
RubyString(Ruby runtime,
RubyClass rubyClass,
ByteList value,
boolean objectSpace) |
protected |
RubyString(Ruby runtime,
RubyClass rubyClass,
ByteList value,
org.jcodings.Encoding enc) |
|
RubyString(Ruby runtime,
RubyClass rubyClass,
ByteList value,
org.jcodings.Encoding encoding,
boolean objectSpace) |
protected |
RubyString(Ruby runtime,
RubyClass rubyClass,
ByteList value,
org.jcodings.Encoding enc,
int cr) |
protected |
RubyString(Ruby runtime,
RubyClass rubyClass,
ByteList value,
int cr) |
|
RubyString(Ruby runtime,
RubyClass rubyClass,
java.lang.CharSequence value) |
|
RubyString(Ruby runtime,
RubyClass rubyClass,
java.lang.CharSequence value,
org.jcodings.Encoding enc) |
attachToObjectSpace, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, convertToType, createObjectClass, dig, dig1, dig2, eqlInternal, equalInternal, inspect, op_eqq, puts, specificEval, toRubyStringaddFinalizer, anyToString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkCallMethod, checkCallMethod, checkFrozen, checkStringType19, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToInteger, convertToInteger, copyInstanceVariablesInto, copySpecialInstanceVariables, createBasicObjectClass, dataGetStruct, dataGetStructChecked, dataWrapStruct, decode, 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, getMarshalVariableList, getMetaClass, getMetaClass, getNativeHandle, getNativeTypeIndex, getObjectId, getRuntime, getSingletonClass, getSingletonClassClone, getSingletonClassCloneAndAttach, getType, getVariable, getVariableCount, getVariableList, getVariableNameList, hashyInspect, hasInstanceVariable, hasInstanceVariables, hasInternalVariable, hasVariables, id, infectBy, initialize19, inspectHashCode, instance_eval, 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, isSpecialObject, isTaint, isTrue, isUntrusted, kind_of_p, makeMetaClass, method_missing, method_missing19, method, method, method19, methods, methods, methods19, nil_p, nonFixnumHashCode, 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, 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_added, singleton_method_added19, singleton_method_removed, singleton_method_removed19, singleton_method_undefined, singleton_method_undefined19, singleton_method, singleton_methods, specificEval, specificEval, specificEval, specificEval, syncVariables, syncVariables, taint, taint, tainted_p, testFrozen, testFrozen, to_a, to_a, trust, type_deprecated, type, untaint, untrust, untrusted_p, validateInstanceVariable, validateInstanceVariable, validateInstanceVariable, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableRemove, variableTableStore, variableTableSync, yieldUnder, yieldUnderclone, finalize, getClass, notify, notifyAll, wait, wait, waitarraypublic static final java.lang.String DEBUG_INFO_FIELD
public static RubyString[] NULL_ARRAY
public RubyString(Ruby runtime, RubyClass rubyClass, java.lang.CharSequence value, org.jcodings.Encoding enc)
public RubyString(Ruby runtime, RubyClass rubyClass, ByteList value, boolean objectSpace)
public RubyString(Ruby runtime, RubyClass rubyClass, ByteList value, org.jcodings.Encoding encoding, boolean objectSpace)
protected RubyString(Ruby runtime, RubyClass rubyClass, ByteList value, org.jcodings.Encoding enc, int cr)
protected RubyString(Ruby runtime, RubyClass rubyClass, 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 static int scanForCodeRange(ByteList bytes)
public final org.jcodings.Encoding checkEncoding(RubyString other)
public final org.jcodings.Encoding checkEncoding(CodeRangeable other)
checkEncoding in interface CodeRangeablepublic static org.jcodings.Encoding checkEncoding(Ruby runtime, ByteList str1, ByteList str2)
public final int strLength()
public final boolean eql(IRubyObject other)
eql in interface IRubyObjecteql in class RubyBasicObjectpublic boolean hasNul()
public void verifyAsciiCompatible()
@Deprecated public RubyString newString(java.lang.CharSequence s)
@Deprecated public RubyString newString(ByteList s)
@Deprecated public static RubyString newString(Ruby runtime, RubyClass clazz, java.lang.CharSequence str)
public static RubyString newStringLight(Ruby runtime, 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, java.lang.CharSequence str)
public static RubyString newString(Ruby runtime, java.lang.CharSequence str, org.jcodings.Encoding encoding)
public static RubyString newString(Ruby runtime, java.lang.String str)
public static RubyString newString(Ruby runtime, java.lang.String str, org.jcodings.Encoding encoding)
public static RubyString newBinaryString(Ruby runtime, java.lang.String str)
public static RubyString newBinaryString(Ruby runtime, ByteList str)
public static RubyString newUSASCIIString(Ruby runtime, java.lang.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, ByteList bytes)
public static RubyString newString(Ruby runtime, ByteList bytes, int coderange)
public static RubyString newString(Ruby runtime, ByteList bytes, org.jcodings.Encoding encoding)
public static RubyString newUnicodeString(Ruby runtime, java.lang.String str)
public static RubyString newUTF8String(Ruby runtime, java.lang.String str)
public static RubyString newUTF16String(Ruby runtime, java.lang.String str)
public static RubyString newUnicodeString(Ruby runtime, java.lang.CharSequence str)
public static RubyString newUTF8String(Ruby runtime, java.lang.CharSequence str)
public static RubyString newUTF16String(Ruby runtime, java.lang.CharSequence str)
public static RubyString newInternalFromJavaExternal(Ruby runtime, java.lang.String str)
runtime - str - @Deprecated public static RubyString newExternalStringWithEncoding(Ruby runtime, java.lang.String string, org.jcodings.Encoding encoding)
public static RubyString newStringShared(Ruby runtime, RubyString orig)
public static RubyString newStringShared(Ruby runtime, ByteList bytes)
public static RubyString newStringShared(Ruby runtime, ByteList bytes, org.jcodings.Encoding encoding)
public static RubyString newStringShared(Ruby runtime, ByteList bytes, int codeRange)
public static RubyString newStringShared(Ruby runtime, RubyClass clazz, ByteList bytes)
public static RubyString newStringShared(Ruby runtime, RubyClass clazz, 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 newEmptyBinaryString(Ruby runtime)
public static RubyString newAllocatedString(Ruby runtime, RubyClass metaClass)
public static RubyString newEmptyString(Ruby runtime, RubyClass metaClass)
public static RubyString newStringNoCopy(Ruby runtime, ByteList bytes)
public static RubyString newStringNoCopy(Ruby runtime, RubyClass clazz, ByteList bytes)
public static RubyString newStringNoCopy(Ruby runtime, byte[] bytes, int start, int length)
public static RubyString newStringNoCopy(Ruby runtime, byte[] bytes)
public final boolean independent()
public final RubyString makeIndependent()
public final RubyString makeIndependent(int length)
public RubyString export(ThreadContext context)
public static RubyString.EmptyByteListHolder getEmptyByteList(org.jcodings.Encoding enc)
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, ByteList bytes, org.jcodings.Encoding enc, int cr)
public static RubyString newStringNoCopy(Ruby runtime, ByteList bytes, org.jcodings.Encoding enc, int cr)
public static RubyString newUsAsciiStringNoCopy(Ruby runtime, ByteList bytes)
public static RubyString newUsAsciiStringShared(Ruby runtime, ByteList bytes)
public static RubyString newUsAsciiStringShared(Ruby runtime, byte[] bytes, int start, int length)
public ClassIndex getNativeClassIndex()
RubyObjectgetNativeClassIndex in interface CoreObjectTypegetNativeClassIndex in class RubyObjectClassIndexpublic java.lang.Class getJavaClass()
RubyBasicObjectgetJavaClass in interface IRubyObjectgetJavaClass in class RubyBasicObjectpublic RubyString convertToString()
RubyBasicObjectconvertToString in interface IRubyObjectconvertToString in class RubyBasicObjectpublic java.lang.String toString()
RubyObjecttoString in interface java.lang.CharSequencetoString in class RubyObjectpublic java.lang.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)
@Deprecated public final 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)
@Deprecated public final RubyString makeShared19(Ruby runtime, int index, int len)
@Deprecated 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 size)
public final void view(ByteList bytes)
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 RubyString asString()
RubyBasicObjectRubyBasicObject.anyToString() is used
instead.asString in interface IRubyObjectasString in class RubyBasicObjectpublic IRubyObject checkStringType()
RubyBasicObjectcheckStringType in interface IRubyObjectcheckStringType 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 java.lang.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 final IRubyObject minus_at(ThreadContext context)
public final IRubyObject plus_at()
public IRubyObject op_plus(ThreadContext context, IRubyObject arg)
public IRubyObject op_plus19(ThreadContext context, IRubyObject arg)
public IRubyObject op_mul(ThreadContext context, IRubyObject other)
public IRubyObject op_mul19(ThreadContext context, IRubyObject other)
public RubyString op_format(ThreadContext context, IRubyObject arg)
public RubyFixnum hash()
RubyBasicObjecthash in class RubyBasicObjectpublic int hashCode()
RubyObjecthashCode in class RubyObjectRubyBasicObject.hashCode()public int strHashCode(Ruby runtime)
runtime - public int unseededStrHashCode(Ruby runtime)
runtime - public boolean equals(java.lang.Object other)
RubyObjectequals in class RubyObjectRubyBasicObject.equals(Object)public static RubyString objAsString(ThreadContext context, IRubyObject obj)
public final int op_cmp(RubyString other)
public java.lang.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 RubyString cat(ByteList other, int codeRange)
public final int cat19(ByteList other, int codeRange)
public final RubyString catString(java.lang.String str)
public final RubyString cat(RubyString str)
public final RubyString cat(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 RubyBasicObjectpublic IRubyObject initialize(ThreadContext context, IRubyObject arg0)
public IRubyObject initialize(ThreadContext context, IRubyObject arg0, IRubyObject opts)
@Deprecated public IRubyObject initialize19(ThreadContext context, IRubyObject arg0)
@Deprecated public IRubyObject casecmp19(ThreadContext context, IRubyObject other)
public IRubyObject casecmp(ThreadContext context, IRubyObject other)
public IRubyObject casecmp_p(ThreadContext context, IRubyObject other)
public IRubyObject op_match(ThreadContext context, IRubyObject other)
op_match 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 pattern, IRubyObject pos, Block block)
public IRubyObject match19(ThreadContext context, IRubyObject[] args, Block block)
public IRubyObject match_p(ThreadContext context, IRubyObject pattern)
public IRubyObject match_p(ThreadContext context, IRubyObject pattern, IRubyObject pos)
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)
@Deprecated public RubyString upcase19(ThreadContext context)
@Deprecated public IRubyObject upcase_bang19(ThreadContext context)
public RubyString upcase(ThreadContext context)
public RubyString upcase(ThreadContext context, IRubyObject arg)
public RubyString upcase(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
public IRubyObject upcase_bang(ThreadContext context)
public IRubyObject upcase_bang(ThreadContext context, IRubyObject arg)
public IRubyObject upcase_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
@Deprecated public RubyString downcase19(ThreadContext context)
@Deprecated public IRubyObject downcase_bang19(ThreadContext context)
public RubyString downcase(ThreadContext context)
public RubyString downcase(ThreadContext context, IRubyObject arg)
public RubyString downcase(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
public IRubyObject downcase_bang(ThreadContext context)
public IRubyObject downcase_bang(ThreadContext context, IRubyObject arg)
public IRubyObject downcase_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
@Deprecated public RubyString swapcase19(ThreadContext context)
@Deprecated public IRubyObject swapcase_bang19(ThreadContext context)
public RubyString swapcase(ThreadContext context)
public RubyString swapcase(ThreadContext context, IRubyObject arg)
public RubyString swapcase(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
public IRubyObject swapcase_bang(ThreadContext context)
public IRubyObject swapcase_bang(ThreadContext context, IRubyObject arg)
public IRubyObject swapcase_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
@Deprecated public IRubyObject capitalize19(ThreadContext context)
@Deprecated public IRubyObject capitalize_bang19(ThreadContext context)
public RubyString capitalize(ThreadContext context)
public RubyString capitalize(ThreadContext context, IRubyObject arg)
public RubyString capitalize(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
public IRubyObject capitalize_bang(ThreadContext context)
public IRubyObject capitalize_bang(ThreadContext context, IRubyObject arg)
public IRubyObject capitalize_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
public IRubyObject dump()
public IRubyObject undump(ThreadContext context)
public IRubyObject insert(ThreadContext context, IRubyObject indexArg, IRubyObject arg)
public RubyString inspect()
inspect in interface IRubyObjectinspect in class RubyBasicObject@Deprecated public IRubyObject inspect19()
public static IRubyObject rbStrEscape(ThreadContext context, RubyString str)
@Deprecated public static IRubyObject inspect19(Ruby runtime, ByteList byteList)
public static RubyString inspect(Ruby runtime, ByteList byteList)
public int size()
public RubyFixnum rubyLength(ThreadContext context)
@Deprecated public RubyFixnum length19()
public RubyFixnum bytesize()
public int length()
length in interface java.lang.CharSequencepublic char charAt(int offset)
charAt in interface java.lang.CharSequencepublic java.lang.CharSequence subSequence(int start,
int end)
subSequence in interface java.lang.CharSequencepublic RubyBoolean empty_p(ThreadContext context)
public boolean isEmpty()
public RubyString append(IRubyObject other)
public RubyString append(RubyString other)
public RubyString append19(IRubyObject other)
public RubyString appendAsDynamicString(IRubyObject other)
public RubyString concatSingle(ThreadContext context, IRubyObject other)
public RubyString concat(ThreadContext context, IRubyObject obj)
public RubyString concat(ThreadContext context, IRubyObject[] objs)
public RubyString concat(IRubyObject other)
@Deprecated public RubyString concat19(ThreadContext context, IRubyObject other)
public IRubyObject prepend(ThreadContext context, IRubyObject other)
public IRubyObject prepend(ThreadContext context, IRubyObject[] objs)
public final RubyString prepend(byte ch)
public final RubyString prepend(int ch)
public RubyString crypt(ThreadContext context, IRubyObject other)
public static RubyString stringValue(IRubyObject object)
@Deprecated public IRubyObject sub19(ThreadContext context, IRubyObject arg0, Block block)
@Deprecated public IRubyObject sub19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
@Deprecated public IRubyObject sub_bang19(ThreadContext context, IRubyObject arg0, Block block)
@Deprecated public IRubyObject sub_bang19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
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 final IRubyObject subBangFast(ThreadContext context, RubyRegexp regexp, RubyString repl)
Note: Internal API, subject to change!
context - regexp - repl - @Deprecated public IRubyObject gsub19(ThreadContext context, IRubyObject arg0, Block block)
@Deprecated public IRubyObject gsub19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
@Deprecated public IRubyObject gsub_bang19(ThreadContext context, IRubyObject arg0, Block block)
@Deprecated public IRubyObject gsub_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 RubyString gsubFast(ThreadContext context, RubyRegexp regexp, RubyString repl, Block block)
public IRubyObject index(ThreadContext context, IRubyObject arg0)
public IRubyObject index(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
@Deprecated public IRubyObject index19(ThreadContext context, IRubyObject arg0)
@Deprecated public IRubyObject index19(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
@Deprecated public IRubyObject rindex19(ThreadContext context, IRubyObject arg0)
@Deprecated public IRubyObject rindex19(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
public IRubyObject rindex(ThreadContext context, IRubyObject arg0)
public IRubyObject rindex(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 arg)
public IRubyObject op_aref(ThreadContext context, IRubyObject arg1, IRubyObject arg2)
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)
@Deprecated public IRubyObject slice_bang19(ThreadContext context, IRubyObject arg0)
@Deprecated public IRubyObject slice_bang19(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
public IRubyObject slice_bang(ThreadContext context, IRubyObject arg0)
public IRubyObject slice_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
@Deprecated public IRubyObject succ19(ThreadContext context)
@Deprecated public IRubyObject succ_bang19()
public IRubyObject succ(ThreadContext context)
public IRubyObject succ_bang()
@Deprecated public final IRubyObject upto19(ThreadContext context, IRubyObject end, Block block)
@Deprecated public final IRubyObject upto19(ThreadContext context, IRubyObject end, IRubyObject excl, Block block)
public final IRubyObject upto(ThreadContext context, IRubyObject end, Block block)
public final IRubyObject upto(ThreadContext context, IRubyObject end, IRubyObject excl, Block block)
@Deprecated public final RubyBoolean include_p19(ThreadContext context, IRubyObject obj)
public RubyBoolean include_p(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)
@Deprecated public IRubyObject to_i19()
@Deprecated public IRubyObject to_i19(IRubyObject arg0)
public IRubyObject stringToInum(int base, boolean badcheck)
public final IRubyObject stringToInum(int base)
@Deprecated public final IRubyObject stringToInum19(int base, boolean badcheck)
public IRubyObject oct(ThreadContext context)
@Deprecated public IRubyObject oct19(ThreadContext context)
public IRubyObject hex(ThreadContext context)
@Deprecated public IRubyObject hex19(ThreadContext context)
public IRubyObject to_f()
@Deprecated public IRubyObject to_f19()
@Deprecated public RubyArray split19(ThreadContext context)
@Deprecated public RubyArray split19(ThreadContext context, IRubyObject arg0)
@Deprecated public RubyArray split19(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
public RubyArray split(ThreadContext context)
public RubyArray split(ThreadContext context, IRubyObject arg0)
public IRubyObject splitWithBlock(ThreadContext context, Block block)
public IRubyObject splitWithBlock(ThreadContext context, IRubyObject arg0, Block block)
public RubyArray split(ThreadContext context, IRubyObject pattern, IRubyObject limit)
public IRubyObject splitWithBlock(ThreadContext context, IRubyObject pattern, IRubyObject limit, Block block)
@Deprecated public RubyArray split19(IRubyObject spat, ThreadContext context, boolean useBackref)
public RubyArray split(RubyRegexp delimiter)
delimiter - public RubyArray split(RubyRegexp delimiter, int limit)
delimiter - limit - public RubyArray split(RubyString delimiter)
delimiter - public RubyArray split(RubyString delimiter, int limit)
delimiter - limit - public IRubyObject scan(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 boolean startsWith(RubyString str)
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)
protected boolean endWith(IRubyObject tmp)
public boolean endsWithAsciiChar(char c)
public IRubyObject delete_prefix(ThreadContext context, IRubyObject prefix)
public IRubyObject delete_suffix(ThreadContext context, IRubyObject suffix)
public IRubyObject delete_prefix_bang(ThreadContext context, IRubyObject prefix)
public IRubyObject delete_suffix_bang(ThreadContext context, IRubyObject suffix)
@Deprecated public IRubyObject ljust19(IRubyObject arg0)
@Deprecated public IRubyObject ljust19(IRubyObject arg0, IRubyObject arg1)
public IRubyObject ljust(IRubyObject arg0)
public IRubyObject ljust(IRubyObject arg0, IRubyObject arg1)
@Deprecated public IRubyObject rjust19(IRubyObject arg0)
@Deprecated public IRubyObject rjust19(IRubyObject arg0, IRubyObject arg1)
public IRubyObject rjust(IRubyObject arg0)
public IRubyObject rjust(IRubyObject arg0, IRubyObject arg1)
@Deprecated public IRubyObject center19(IRubyObject arg0)
@Deprecated public IRubyObject center19(IRubyObject arg0, IRubyObject arg1)
public IRubyObject center(IRubyObject arg0)
public IRubyObject center(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)
@Deprecated public IRubyObject chop19(ThreadContext context)
@Deprecated public IRubyObject chop_bang19(ThreadContext context)
public IRubyObject chop(ThreadContext context)
public IRubyObject chop_bang(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)
@Deprecated public IRubyObject lstrip19(ThreadContext context)
@Deprecated public IRubyObject lstrip_bang19(ThreadContext context)
public IRubyObject lstrip(ThreadContext context)
public IRubyObject lstrip_bang(ThreadContext context)
@Deprecated public IRubyObject rstrip19(ThreadContext context)
@Deprecated public IRubyObject rstrip_bang19(ThreadContext context)
public IRubyObject rstrip(ThreadContext context)
public IRubyObject rstrip_bang(ThreadContext context)
@Deprecated public IRubyObject strip19(ThreadContext context)
@Deprecated public IRubyObject strip_bang19(ThreadContext context)
public IRubyObject strip(ThreadContext context)
public IRubyObject strip_bang(ThreadContext context)
@Deprecated public IRubyObject count19(ThreadContext context)
@Deprecated public IRubyObject count19(ThreadContext context, IRubyObject arg)
@Deprecated public IRubyObject count19(ThreadContext context, IRubyObject[] args)
public IRubyObject count(ThreadContext context)
public IRubyObject count(ThreadContext context, IRubyObject arg)
public IRubyObject count(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)
@Deprecated public IRubyObject delete19(ThreadContext context)
@Deprecated public IRubyObject delete19(ThreadContext context, IRubyObject arg)
@Deprecated public IRubyObject delete19(ThreadContext context, IRubyObject[] args)
@Deprecated public IRubyObject delete_bang19(ThreadContext context)
@Deprecated public IRubyObject delete_bang19(ThreadContext context, IRubyObject arg)
@Deprecated 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)
@Deprecated public IRubyObject squeeze19(ThreadContext context)
@Deprecated public IRubyObject squeeze19(ThreadContext context, IRubyObject arg)
@Deprecated public IRubyObject squeeze19(ThreadContext context, IRubyObject[] args)
@Deprecated public IRubyObject squeeze_bang19(ThreadContext context)
@Deprecated public IRubyObject squeeze_bang19(ThreadContext context, IRubyObject arg)
@Deprecated 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_line(ThreadContext context, IRubyObject arg, IRubyObject opts, Block block)
@Deprecated public IRubyObject each_lineCommon(ThreadContext context, IRubyObject sep, Block block)
@Deprecated public IRubyObject each_line19(ThreadContext context, Block block)
@Deprecated 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 lines(ThreadContext context, IRubyObject arg, IRubyObject opts, Block block)
public IRubyObject each_byte(ThreadContext context, Block block)
@Deprecated public IRubyObject each_byte19(ThreadContext context, Block block)
public IRubyObject bytes(ThreadContext context, Block block)
public IRubyObject each_char(ThreadContext context, Block block)
public IRubyObject chars(ThreadContext context, Block block)
@Deprecated public IRubyObject each_char19(ThreadContext context, Block block)
@Deprecated public IRubyObject chars19(ThreadContext context, Block block)
public IRubyObject each_codepoint(ThreadContext context, Block block)
public IRubyObject codepoints(ThreadContext context, Block block)
public IRubyObject grapheme_clusters(ThreadContext context, Block block)
public IRubyObject each_grapheme_cluster(ThreadContext context, Block block)
public RubySymbol intern()
@Deprecated 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 java.io.IOException
java.io.IOExceptionpublic RubyArray unpack(ThreadContext context, IRubyObject obj, Block block)
public RubyArray unpack(ThreadContext context, IRubyObject obj, IRubyObject opt, Block block)
public IRubyObject unpack1(ThreadContext context, IRubyObject obj, Block block)
public IRubyObject unpack1(ThreadContext context, IRubyObject obj, IRubyObject opt, Block block)
@Deprecated public 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(java.lang.CharSequence value)
value - The new java.lang.String this RubyString should encapsulatepublic void setValue(ByteList value)
public java.lang.CharSequence getValue()
public byte[] getBytes()
public ByteList getByteList()
getByteList in interface ByteListHolderpublic java.lang.String getUnicodeValue()
public static ByteList encodeBytelist(java.lang.CharSequence value, org.jcodings.Encoding encoding)
public <T> T toJava(java.lang.Class<T> target)
IRubyObjecttoJava in interface IRubyObjecttoJava in class RubyBasicObjecttarget - The target type to which the object should be converted.IRubyObject.toJava(java.lang.Class<T>)public IRubyObject strScrub(ThreadContext context, IRubyObject repl, Block block)
public IRubyObject encStrScrub(ThreadContext context, org.jcodings.Encoding enc, IRubyObject repl, Block block)
public IRubyObject encStrScrub(ThreadContext context, org.jcodings.Encoding enc, IRubyObject repl, int cr, Block block)
public int rbStrOffset(int pos)
public static IRubyObject includeRange(ThreadContext context, RubyString _beg, RubyString _end, IRubyObject _val, boolean exclusive)
public boolean isBare(Ruby runtime)
@Deprecated public final RubyString strDup()
@Deprecated public final void modify19(int length)
@Deprecated public RubyArray split19(ThreadContext context, IRubyObject arg0, boolean useBackref)
@Deprecated public IRubyObject lines20(ThreadContext context, Block block)
@Deprecated public IRubyObject lines20(ThreadContext context, IRubyObject arg, Block block)
@Deprecated public IRubyObject dump19()
@Deprecated public IRubyObject insert19(ThreadContext context, IRubyObject indexArg, IRubyObject stringArg)
@Deprecated public IRubyObject op_equal19(ThreadContext context, IRubyObject other)
@Deprecated public IRubyObject op_aref19(ThreadContext context, IRubyObject arg1, IRubyObject arg2)
@Deprecated public IRubyObject op_aref19(ThreadContext context, IRubyObject arg)
@Deprecated public IRubyObject op_aset19(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
@Deprecated public IRubyObject op_aset19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)
@Deprecated public IRubyObject op_match19(ThreadContext context, IRubyObject other)
op_match19 in class RubyBasicObject@Deprecated public IRubyObject scan19(ThreadContext context, IRubyObject arg, Block block)
Copyright © 2001-2023 JRuby. All Rights Reserved.