public class RubyString extends RubyObject implements EncodingCapable, MarshalEncoding, CodeRangeable
RubyObject.Data
RubyBasicObject.Finalizer
FIELD_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_ALLOCATOR
ALL_F, BASICOBJECT_ALLOCATOR, COMPARE_BY_IDENTITY_F, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, metaClass, NEVER, NIL_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, VAR_TABLE_OFFSET, varTable, varTableStamp
NULL_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, specificEval
addFinalizer, 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_deprecated, 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, itself, 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, singleton_methods19, 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, yieldUnder
public 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 EncodingCapable
public void setEncoding(org.jcodings.Encoding encoding)
setEncoding
in interface EncodingCapable
public boolean shouldMarshalEncoding()
shouldMarshalEncoding
in interface MarshalEncoding
public org.jcodings.Encoding getMarshalEncoding()
getMarshalEncoding
in interface MarshalEncoding
public 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 CodeRangeable
public final void setCodeRange(int codeRange)
setCodeRange
in interface CodeRangeable
public final void clearCodeRange()
clearCodeRange
in interface CodeRangeable
public final boolean isCodeRangeAsciiOnly()
public final boolean isAsciiOnly()
public final boolean isCodeRangeValid()
isCodeRangeValid
in interface CodeRangeable
public final boolean isCodeRangeBroken()
public final int scanForCodeRange()
scanForCodeRange
in interface CodeRangeable
public final org.jcodings.Encoding checkEncoding(RubyString other)
public final org.jcodings.Encoding checkEncoding(ByteListHolder other)
checkEncoding
in interface ByteListHolder
public final int strLength()
public final boolean eql(IRubyObject other)
eql
in interface IRubyObject
eql
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, 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()
RubyObject
getNativeClassIndex
in interface CoreObjectType
getNativeClassIndex
in class RubyObject
ClassIndex
public Class getJavaClass()
RubyBasicObject
getJavaClass
in interface IRubyObject
getJavaClass
in class RubyBasicObject
public RubyString convertToString()
RubyBasicObject
convertToString
in interface IRubyObject
convertToString
in class RubyBasicObject
public String toString()
RubyObject
toString
in class RubyObject
public String decodeString()
public IRubyObject dup()
dup
in interface IRubyObject
dup
in class RubyBasicObject
public 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 final void modify()
public final void modify19()
public final void modify(int length)
modify
in interface ByteListHolder
public 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()
RubyBasicObject
RubyBasicObject.anyToString()
is used
instead.asString
in interface IRubyObject
asString
in class RubyBasicObject
public IRubyObject checkStringType()
RubyBasicObject
checkStringType
in interface IRubyObject
checkStringType
in class RubyBasicObject
public IRubyObject checkStringType19()
RubyBasicObject
checkStringType19
in interface IRubyObject
checkStringType19
in class RubyBasicObject
public static IRubyObject try_convert(ThreadContext context, IRubyObject recv, IRubyObject str)
public IRubyObject to_s()
RubyBasicObject
to_s
prints the object's class and an encoding of the
object id. As a special case, the top-level object that is the
initial execution context of Ruby programs returns ``main.''to_s
in class RubyBasicObject
public final int compareTo(IRubyObject other)
RubyBasicObject
compareTo
in interface Comparable<IRubyObject>
compareTo
in class RubyBasicObject
other
- another IRubyObjectpublic IRubyObject op_cmp(ThreadContext context, IRubyObject other)
op_cmp
in class RubyBasicObject
public IRubyObject op_equal(ThreadContext context, IRubyObject other)
op_equal
in interface IRubyObject
op_equal
in class RubyBasicObject
public 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()
RubyBasicObject
hash
in class RubyBasicObject
public int hashCode()
RubyObject
hashCode
in class RubyObject
public int strHashCode(Ruby runtime)
runtime
- public int unseededStrHashCode(Ruby runtime)
runtime
- public boolean equals(Object other)
RubyObject
equals
in class RubyObject
public static RubyString objAsString(ThreadContext context, IRubyObject obj)
public final int op_cmp(RubyString other)
public String asJavaString()
asJavaString
in interface IRubyObject
asJavaString
in class RubyBasicObject
public 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)
RubyBasicObject
initialize_copy
in class RubyBasicObject
public 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 RubyObject
public IRubyObject initialize(ThreadContext context, IRubyObject arg0)
public IRubyObject initialize19(ThreadContext context)
initialize19
in class RubyBasicObject
public 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 RubyBasicObject
public IRubyObject op_match19(ThreadContext context, IRubyObject other)
op_match19
in class RubyBasicObject
public 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 IRubyObject
inspect
in class RubyBasicObject
public 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(ThreadContext context, IRubyObject arg0, boolean useBackref)
public IRubyObject scan(ThreadContext context, IRubyObject arg, Block block)
public IRubyObject scan19(ThreadContext context, IRubyObject arg, 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
IOException
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)
RubyBasicObject
TypeError
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 RubyBasicObject
public 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 ByteListHolder
public String getUnicodeValue()
public static org.jruby.util.ByteList encodeBytelist(CharSequence value, org.jcodings.Encoding encoding)
public Object toJava(Class target)
IRubyObject
toJava
in interface IRubyObject
toJava
in class RubyBasicObject
target
- The target type to which the object should be converted.IRubyObject.toJava(java.lang.Class)
public IRubyObject strScrub(ThreadContext context, IRubyObject repl, Block block)
@Deprecated public final RubyString strDup()
@Deprecated public final void modify19(int length)
Copyright © 2001-2015 JRuby. All Rights Reserved.