Package org.jruby
Class RubyString
java.lang.Object
org.jruby.RubyBasicObject
org.jruby.RubyObject
org.jruby.RubyString
- All Implemented Interfaces:
Serializable,CharSequence,Cloneable,Comparable<IRubyObject>,InstanceVariables,InternalVariables,IRubyObject,EncodingCapable,MarshalEncoding,CoreObjectType,ByteListHolder,CodeRangeable
public class RubyString
extends RubyObject
implements CharSequence, EncodingCapable, MarshalEncoding, CodeRangeable
Implementation of Ruby String class
Concurrency: no synchronization is required among readers, but
all users must synchronize externally with writers.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classEncoding aware String construction routines for 1.9private static classNested classes/interfaces inherited from class org.jruby.RubyObject
RubyObject.DataNested classes/interfaces inherited from class org.jruby.RubyBasicObject
RubyBasicObject.Finalizer -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final org.jcodings.specific.ASCIIEncodingstatic final Stringprivate static final ByteListprivate static RubyString.EmptyByteListHolder[]private static final ByteListprivate static final byte[]private static final ByteListprivate static final byte[]static RubyString[]private static final org.joni.RegexA Regex instance is required to satisfy the type signature of RubyRegexp.regsub In the code paths possible for a string pattern a single instance of a blank regex is enough.private static final byte[]private static final byte[]private static final byte[]private static final byte[]private static final byte[]private static final byte[]private static final intprivate static final intprivate static final intprivate intprivate static final ByteListprivate static final ByteList(package private) static final org.jcodings.specific.UTF8Encodingprivate ByteListFields inherited from class org.jruby.RubyObject
IVAR_INSPECTING_OBJECT_ALLOCATOR, OBJECT_ALLOCATOR, REIFYING_OBJECT_ALLOCATORFields inherited from class org.jruby.RubyBasicObject
ALL_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, varTableStamp -
Constructor Summary
ConstructorsModifierConstructorDescriptionRubyString(Ruby runtime, RubyClass rubyClass) RubyString(Ruby runtime, RubyClass rubyClass, byte[] value) RubyString(Ruby runtime, RubyClass rubyClass, CharSequence value) RubyString(Ruby runtime, RubyClass rubyClass, CharSequence value, org.jcodings.Encoding enc) privateRubyString(Ruby runtime, RubyClass rubyClass, String value, org.jcodings.Encoding enc) RubyString(Ruby runtime, RubyClass rubyClass, ByteList value) RubyString(Ruby runtime, RubyClass rubyClass, ByteList value, boolean objectSpace) protectedRubyString(Ruby runtime, RubyClass rubyClass, ByteList value, int cr) protectedRubyString(Ruby runtime, RubyClass rubyClass, ByteList value, org.jcodings.Encoding enc) RubyString(Ruby runtime, RubyClass rubyClass, ByteList value, org.jcodings.Encoding encoding, boolean objectSpace) protectedRubyString(Ruby runtime, RubyClass rubyClass, ByteList value, org.jcodings.Encoding enc, int cr) -
Method Summary
Modifier and TypeMethodDescriptionappend(RubyString other) append(IRubyObject other) rb_str_append(package private) final RubyStringappend19(RubyString other) append19(IRubyObject other) appendAsDynamicString(IRubyObject other) ascii_only_p(ThreadContext context) rb_to_idprivate static RubyRegexpasRegexpArg(Ruby runtime, IRubyObject arg0) voidassociateEncoding(org.jcodings.Encoding enc) asString()rb_obj_as_string First converts this object into a String using the "to_s" method, infects it with the current taint and returns it.private RubyArrayb(ThreadContext context) private IRubyObjectbyteARef(Ruby runtime, IRubyObject idx) static StringbyteListToString(ByteList bytes) bytes(ThreadContext context, Block block) bytesize()private static IRubyObjectbyteSize(ThreadContext context, RubyString recv, IRubyObject[] args) A byte size method suitable for lambda method reference implementation ofRubyEnumerator.SizeFn.size(ThreadContext, IRubyObject, IRubyObject[])byteslice(ThreadContext context, IRubyObject arg) byteslice(ThreadContext context, IRubyObject arg1, IRubyObject arg2) static StringbytesToString(byte[] bytes) static StringbytesToString(byte[] bytes, int beg, int len) private IRubyObjectbyteSubstr(Ruby runtime, int beg, int len) capitalize(ThreadContext context) capitalize(ThreadContext context, IRubyObject arg) capitalize(ThreadContext context, IRubyObject arg0, IRubyObject arg1) capitalize_bang(ThreadContext context) private IRubyObjectcapitalize_bang(ThreadContext context, int flags) capitalize_bang(ThreadContext context, IRubyObject arg) capitalize_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1) capitalize_bang19(ThreadContext context) Deprecated.capitalize19(ThreadContext context) Deprecated.casecmp(ThreadContext context, IRubyObject other) casecmp_p(ThreadContext context, IRubyObject other) casecmp19(ThreadContext context, IRubyObject other) Deprecated.private intfinal RubyStringcat(byte ch) final RubyStringcat(byte[] str) final RubyStringcat(byte[] str, int beg, int len) final intcat(byte[] bytes, int p, int len, org.jcodings.Encoding enc) final RubyStringcat(int ch) final RubyStringcat(int code, org.jcodings.Encoding enc) final RubyStringcat(RubyString str) final RubyStringfinal RubyStringfinal RubyStringcat19(RubyString str2) final intfinal RubyStringcatAscii(byte[] bytes, int ptr, int ptrLen) final RubyStringcenter(IRubyObject arg0) center(IRubyObject arg0, IRubyObject arg1) center19(IRubyObject arg0) Deprecated.center19(IRubyObject arg0, IRubyObject arg1) Deprecated.charcharAt(int offset) chars(ThreadContext context, Block block) chars19(ThreadContext context, Block block) Deprecated.private org.jcodings.Encodingstatic org.jcodings.EncodingcheckEncoding(Ruby runtime, ByteList str1, ByteList str2) final org.jcodings.EncodingcheckEncoding(RubyString other) (package private) final org.jcodings.EncodingcheckEncoding(EncodingCapable other) final org.jcodings.EncodingcheckEncoding(CodeRangeable other) private intcheckIndex(int beg, int len) private intcheckIndexForRef(int beg, int len) private intcheckLength(int len) rb_check_string_type Tries to return a coerced string representation of this object, using "to_str".chomp(ThreadContext context) chomp(ThreadContext context, IRubyObject arg0) chomp_bang(ThreadContext context) rb_str_chomp_bang In the common case, removes CR and LF characters in various ways depending on the value of the optional args[0].chomp_bang(ThreadContext context, IRubyObject arg0) chomp_bang19(ThreadContext context) chomp_bang19(ThreadContext context, IRubyObject arg0) chomp19(ThreadContext context) chomp19(ThreadContext context, IRubyObject arg0) private IRubyObjectchompBangCommon(Ruby runtime, IRubyObject rsObj) chop(ThreadContext context) chop_bang(ThreadContext context) chop_bang19(ThreadContext context) Deprecated.chop19(ThreadContext context) Deprecated.chr(ThreadContext context) clear()final voidprivate booleancmpIsBuiltin(ThreadContext context) codepoints(ThreadContext context, Block block) private static IRubyObjectcodepointSize(ThreadContext context, RubyString recv, IRubyObject[] args) A codepoint size method suitable for lambda method reference implementation ofRubyEnumerator.SizeFn.size(ThreadContext, IRubyObject, IRubyObject[])final intcompareTo(IRubyObject other) Compares this Ruby object with another.concat(IRubyObject other) concat(ThreadContext context, IRubyObject obj) rb_str_concatconcat(ThreadContext context, IRubyObject[] objs) rb_str_concat_multiconcat19(ThreadContext context, IRubyObject other) Deprecated.private RubyStringconcatNumeric(Ruby runtime, int c) concatSingle(ThreadContext context, IRubyObject other) rb_str_concatTries to convert this object to a Ruby String using the "to_str" method.private voidcopyCodeRangeForSubstr(RubyString from, org.jcodings.Encoding enc) count(ThreadContext context) count(ThreadContext context, IRubyObject arg) count(ThreadContext context, IRubyObject[] args) count19(ThreadContext context) Deprecated.count19(ThreadContext context, IRubyObject arg) Deprecated.count19(ThreadContext context, IRubyObject[] args) Deprecated.static RubyClasscreateStringClass(Ruby runtime) crypt(ThreadContext context, IRubyObject other) rb_str_cryptConvert this Ruby string to a Java String.delete(ThreadContext context) rb_str_delete / rb_str_delete_bangdelete(ThreadContext context, IRubyObject arg) delete(ThreadContext context, IRubyObject[] args) delete_bang(ThreadContext context) delete_bang(ThreadContext context, IRubyObject arg) delete_bang(ThreadContext context, IRubyObject[] args) delete_bang19(ThreadContext context) Deprecated.delete_bang19(ThreadContext context, IRubyObject arg) Deprecated.delete_bang19(ThreadContext context, IRubyObject[] args) Deprecated.delete_prefix(ThreadContext context, IRubyObject prefix) delete_prefix_bang(ThreadContext context, IRubyObject prefix) delete_suffix(ThreadContext context, IRubyObject suffix) delete_suffix_bang(ThreadContext context, IRubyObject suffix) delete19(ThreadContext context) Deprecated.delete19(ThreadContext context, IRubyObject arg) Deprecated.delete19(ThreadContext context, IRubyObject[] args) Deprecated.private intdeletedPrefixLength(IRubyObject _prefix) private intdeletedSuffixLength(IRubyObject _suffix) doClone()private RubyArraydoSplit(IRubyObject delimiter, int limit) downcase(ThreadContext context) downcase(ThreadContext context, IRubyObject arg) downcase(ThreadContext context, IRubyObject arg0, IRubyObject arg1) downcase_bang(ThreadContext context) private IRubyObjectdowncase_bang(ThreadContext context, int flags) downcase_bang(ThreadContext context, IRubyObject arg) downcase_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1) downcase_bang19(ThreadContext context) Deprecated.downcase19(ThreadContext context) Deprecated.dump()rb_str_dumpdump19()Deprecated.dup()Overridden dup for fast-path logic.each_byte(ThreadContext context, Block block) rb_str_each_byteeach_byte19(ThreadContext context, Block block) Deprecated.each_char(ThreadContext context, Block block) each_char19(ThreadContext context, Block block) Deprecated.each_codepoint(ThreadContext context, Block block) rb_str_each_codepointeach_grapheme_cluster(ThreadContext context, Block block) each_line(ThreadContext context, Block block) rb_str_each_lineeach_line(ThreadContext context, IRubyObject arg, Block block) each_line(ThreadContext context, IRubyObject arg, IRubyObject opts, Block block) each_line19(ThreadContext context, Block block) Deprecated.each_line19(ThreadContext context, IRubyObject arg, Block block) Deprecated.each_lineCommon(ThreadContext context, IRubyObject sep, Block block) Deprecated.private static IRubyObjecteachCharSize(ThreadContext context, RubyString recv, IRubyObject[] args) A character size method suitable for lambda method reference implementation ofRubyEnumerator.SizeFn.size(ThreadContext, IRubyObject, IRubyObject[])private static IRubyObjecteachGraphemeClusterSize(ThreadContext context, RubyString self, IRubyObject[] args) A grapheme cluster size method suitable for lambda method reference implementation ofRubyEnumerator.SizeFn.size(ThreadContext, IRubyObject, IRubyObject[])voidempty()empty_p(ThreadContext context) rb_str_emptyencode(ThreadContext context) encode(ThreadContext context, IRubyObject arg) encode(ThreadContext context, IRubyObject toEncoding, IRubyObject arg) encode(ThreadContext context, IRubyObject toEncoding, IRubyObject forcedEncoding, IRubyObject opts) encode_bang(ThreadContext context, IRubyObject arg0) encode_bang(ThreadContext context, IRubyObject[] args) encode_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1) encode_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) static ByteListencodeBytelist(CharSequence value, org.jcodings.Encoding encoding) (package private) static ByteListencodeBytelist(String value, org.jcodings.Encoding encoding) encoding(ThreadContext context) encStrScrub(ThreadContext context, org.jcodings.Encoding enc, IRubyObject repl, int cr, Block block) encStrScrub(ThreadContext context, org.jcodings.Encoding enc, IRubyObject repl, Block block) end_with_p(ThreadContext context) end_with_p(ThreadContext context, IRubyObject arg) end_with_p(ThreadContext context, IRubyObject[] args) booleanendsWithAsciiChar(char c) private booleanendWith(IRubyObject tmp) private IRubyObjectenumerateBytes(ThreadContext context, String name, Block block, boolean wantarray) private IRubyObjectenumerateChars(ThreadContext context, String name, Block block, boolean wantarray) private IRubyObjectenumerateCodepoints(ThreadContext context, String name, Block block, boolean wantarray) private IRubyObjectenumerateGraphemeClusters(ThreadContext context, String name, Block block, boolean wantarray) final booleaneql(IRubyObject other) short circuit for String key comparisonprivate booleaneql19(IRubyObject other) booleanThis override does not do a "checked" dispatch.(package private) final booleanequals(RubyString other) export(ThreadContext context) private IRubyObjectforce_encoding(org.jcodings.Encoding encoding) force_encoding(ThreadContext context, IRubyObject enc) freeze(ThreadContext context) rb_obj_freeze call-seq: obj.freeze => obj Prevents further modifications to obj.private voidprivate voidfrozenCheck(boolean runtimeError) getbyte(ThreadContext context, IRubyObject index) byte[]getBytes()final intgetEmptyByteList(org.jcodings.Encoding enc) org.jcodings.EncodingWill return the Java interface that most closely can represent this object, when working through Java integration translations.org.jcodings.EncodingThis is overridden in the other concrete Java builtins to provide a fast way to determine what type they are.private static RubyRegexpgetPattern(Ruby runtime, IRubyObject obj) get_pat (used by match/match19)private static IRubyObjectgetPatternQuoted(ThreadContext context, IRubyObject pat, boolean check) private static RubyStringgetStringForPattern(Ruby runtime, IRubyObject obj) used by ar-jdbcgetValue()grapheme_clusters(ThreadContext context, Block block) gsub(ThreadContext context, IRubyObject arg0, Block block) gsub(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block) gsub_bang(ThreadContext context, IRubyObject arg0, Block block) gsub_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block) gsub_bang19(ThreadContext context, IRubyObject arg0, Block block) Deprecated.gsub_bang19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block) Deprecated.gsub19(ThreadContext context, IRubyObject arg0, Block block) Deprecated.gsub19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block) Deprecated.private IRubyObjectgsubCommon(ThreadContext context, Block block, RubyString repl, RubyHash hash, RubyRegexp regexp, boolean bang, int tuFlags, boolean useBackref) private IRubyObjectgsubCommon(ThreadContext context, Block block, RubyString repl, RubyHash hash, RubyString pattern, boolean bang, int tuFlags, boolean useBackref) private IRubyObjectgsubCommon(ThreadContext context, Block block, RubyString repl, RubyHash hash, IRubyObject arg0, boolean bang, int tuFlags) private IRubyObjectgsubCommon(ThreadContext context, Block block, RubyString repl, RubyHash hash, IRubyObject arg0, boolean bang, int tuFlags, boolean useBackref) gsubFast(ThreadContext context, RubyRegexp regexp, RubyString repl, Block block) private IRubyObjectgsubImpl(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block, boolean bang) hash()rb_obj_id Will return the hash code of this object.inthashCode()This override does not do "checked" dispatch since Object usually has #hash defined.hex(ThreadContext context) rb_str_hexhex19(ThreadContext context) Deprecated.include_p(ThreadContext context, IRubyObject obj) rb_str_includefinal RubyBooleaninclude_p19(ThreadContext context, IRubyObject obj) Deprecated.static IRubyObjectincludeRange(ThreadContext context, RubyString _beg, RubyString _end, IRubyObject _val, boolean exclusive) final booleanindex(ThreadContext context, IRubyObject arg0) rb_str_index_mindex(ThreadContext context, IRubyObject arg0, IRubyObject arg1) index19(ThreadContext context, IRubyObject arg0) Deprecated.index19(ThreadContext context, IRubyObject arg0, IRubyObject arg1) Deprecated.private IRubyObjectindexCommon19(ThreadContext context, IRubyObject sub, int pos) (package private) static intindexOf(byte[] source, int sourceOffset, int sourceCount, byte[] target, int targetOffset, int targetCount, int fromIndex, org.jcodings.Encoding enc) initialize(ThreadContext context) initialize(ThreadContext context, IRubyObject arg0) private IRubyObjectinitialize(ThreadContext context, IRubyObject arg0, RubyHash opts) initialize(ThreadContext context, IRubyObject arg0, IRubyObject opts) initialize_copy(IRubyObject other) rb_obj_init_copy Initializes this object as a copy of the original, that is the parameter to this object.initialize19(ThreadContext context, IRubyObject arg0) Deprecated.insert(ThreadContext context, IRubyObject indexArg, IRubyObject arg) insert19(ThreadContext context, IRubyObject indexArg, IRubyObject stringArg) Deprecated.inspect()rb_str_inspect(package private) final RubyStringstatic RubyStringDeprecated.static IRubyObjectDeprecated.intern()rb_str_internintern19()Deprecated.private static final IRubyObjectinvalidFormat(Ruby runtime) final booleanbooleanIs this a "bare" string, i.e.final booleanfinal booleanfinal booleanfinal boolean(package private) final org.jcodings.EncodingisCompatibleWith(EncodingCapable other) booleanisEmpty()private IRubyObjectjustify(Ruby runtime, IRubyObject arg0, int jflag) private IRubyObjectjustify(IRubyObject arg0, IRubyObject arg1, int jflag) private RubyStringjustifyCommon(Ruby runtime, ByteList pad, int padCharLen, boolean padSinglebyte, org.jcodings.Encoding enc, int width, int jflag) final voidintlength()length19()Deprecated.lines(ThreadContext context, Block block) lines(ThreadContext context, IRubyObject arg, Block block) lines20(ThreadContext context, Block block) Deprecated.lines20(ThreadContext context, IRubyObject arg, Block block) Deprecated.ljust(IRubyObject arg0) ljust(IRubyObject arg0, IRubyObject arg1) ljust19(IRubyObject arg0) Deprecated.ljust19(IRubyObject arg0, IRubyObject arg1) Deprecated.lstrip(ThreadContext context) lstrip_bang(ThreadContext context) lstrip_bang19(ThreadContext context) Deprecated.lstrip19(ThreadContext context) Deprecated.final RubyStringfinal RubyStringmakeIndependent(int length) final RubyStringmakeShared(Ruby runtime, int index, int len) final RubyStringmakeShared(Ruby runtime, RubyClass meta, int index, int len) private RubyStringmakeShared(Ruby runtime, RubyClass meta, ByteList value, int index, int len) private RubyStringmakeShared(Ruby runtime, ByteList value, int index, int len) final RubyStringmakeShared19(Ruby runtime, int index, int len) Deprecated.final RubyStringmakeShared19(Ruby runtime, RubyClass meta, int index, int len) Deprecated.final RubyStringmakeSharedString(Ruby runtime, int index, int len) final RubyStringmakeSharedString19(Ruby runtime, int index, int len) Deprecated.match(ThreadContext context, IRubyObject pattern) String#match(pattern) rb_str_match_mmatch_p(ThreadContext context, IRubyObject pattern) match_p(ThreadContext context, IRubyObject pattern, IRubyObject pos) match19(ThreadContext context, IRubyObject[] args, Block block) match19(ThreadContext context, IRubyObject pattern, Block block) match19(ThreadContext context, IRubyObject pattern, IRubyObject pos, Block block) final IRubyObjectminus_at(ThreadContext context) final voidmodify()rb_str_modifyfinal voidmodify(int length) rb_str_modify (with length bytes ensured)final voidmodify19()final voidmodify19(int length) Deprecated.voidfinal voidCheck that the string can be modified, raising error otherwise.voidmodifyCheck(byte[] b, int len) private voidmodifyCheck(byte[] b, int len, org.jcodings.Encoding enc) final voidmodifyExpand(int length) rb_str_modify_expandprivate charmultibyteCharAt(org.jcodings.Encoding enc, int beg, int length) private IRubyObjectmultiByteLStrip(ThreadContext context, org.jcodings.Encoding enc, byte[] bytes, int s, int end) private IRubyObjectmultiByteRStrip(ThreadContext context) private IRubyObjectmultibyteSubstr19(Ruby runtime, org.jcodings.Encoding enc, int len, int beg, int length) private RubyStringmultiplyByteList(ThreadContext context, IRubyObject arg) private voidmustnotBroken(ThreadContext context) static RubyStringnewAllocatedString(Ruby runtime, RubyClass metaClass) static RubyStringnewBinaryString(Ruby runtime, String str) static RubyStringnewBinaryString(Ruby runtime, ByteList str) static RubyStringnewEmptyString(Ruby runtime) static RubyStringnewEmptyString(Ruby runtime, org.jcodings.Encoding enc) static RubyStringnewEmptyString(Ruby runtime, RubyClass metaClass) static RubyStringnewEmptyString(Ruby runtime, RubyClass metaClass, org.jcodings.Encoding enc) static RubyStringnewExternalStringWithEncoding(Ruby runtime, String string, org.jcodings.Encoding encoding) Deprecated.static RubyStringnewInstance(IRubyObject recv, IRubyObject[] args, Block block) rb_str_s_newstatic RubyStringnewInternalFromJavaExternal(Ruby runtime, String str) Return a new Ruby String encoded as the default internal encoding given a Java String that has come from an external source.Deprecated.(package private) static RubyStringstatic RubyStringstatic RubyStringstatic RubyStringstatic RubyStringnewString(Ruby runtime, CharSequence str) static RubyStringnewString(Ruby runtime, CharSequence str, org.jcodings.Encoding encoding) static RubyStringstatic RubyStringstatic RubyStringnewString(Ruby runtime, RubyClass clazz, CharSequence str) Deprecated.static RubyStringstatic RubyStringstatic RubyStringDeprecated.static RubyStringnewStringLight(Ruby runtime, int size) static RubyStringnewStringLight(Ruby runtime, int size, org.jcodings.Encoding encoding) static RubyStringnewStringLight(Ruby runtime, ByteList bytes) static RubyStringnewStringNoCopy(Ruby runtime, byte[] bytes) static RubyStringnewStringNoCopy(Ruby runtime, byte[] bytes, int start, int length) static RubyStringnewStringNoCopy(Ruby runtime, RubyClass clazz, ByteList bytes) static RubyStringnewStringNoCopy(Ruby runtime, RubyClass clazz, ByteList bytes, org.jcodings.Encoding enc, int cr) static RubyStringnewStringNoCopy(Ruby runtime, ByteList bytes) static RubyStringnewStringNoCopy(Ruby runtime, ByteList bytes, org.jcodings.Encoding enc, int cr) static RubyStringnewStringShared(Ruby runtime, byte[] bytes) static RubyStringnewStringShared(Ruby runtime, byte[] bytes, int start, int length) static RubyStringnewStringShared(Ruby runtime, byte[] bytes, int start, int length, org.jcodings.Encoding encoding) static RubyStringnewStringShared(Ruby runtime, byte[] bytes, org.jcodings.Encoding encoding) static RubyStringnewStringShared(Ruby runtime, RubyClass clazz, ByteList bytes) static RubyStringnewStringShared(Ruby runtime, RubyClass clazz, ByteList bytes, org.jcodings.Encoding encoding) static RubyStringnewStringShared(Ruby runtime, RubyString orig) static RubyStringnewStringShared(Ruby runtime, ByteList bytes) static RubyStringnewStringShared(Ruby runtime, ByteList bytes, int codeRange) static RubyStringnewStringShared(Ruby runtime, ByteList bytes, org.jcodings.Encoding encoding) private static RubyStringnewStringShared(Ruby runtime, ByteList bytes, org.jcodings.Encoding encoding, int cr) static RubyStringnewUnicodeString(Ruby runtime, CharSequence str) static RubyStringnewUnicodeString(Ruby runtime, String str) static RubyStringnewUSASCIIString(Ruby runtime, String str) static RubyStringnewUsAsciiStringNoCopy(Ruby runtime, ByteList bytes) static RubyStringnewUsAsciiStringShared(Ruby runtime, byte[] bytes, int start, int length) static RubyStringnewUsAsciiStringShared(Ruby runtime, ByteList bytes) static RubyStringnewUTF16String(Ruby runtime, CharSequence str) static RubyStringnewUTF16String(Ruby runtime, String str) static RubyStringnewUTF8String(Ruby runtime, CharSequence str) static RubyStringnewUTF8String(Ruby runtime, String str) static RubyStringobjAsString(ThreadContext context, IRubyObject obj) rb_obj_as_stringoct(ThreadContext context) rb_str_octoct19(ThreadContext context) Deprecated.private IRubyObjectop_aref(ThreadContext context, IRubyObject arg) rb_str_aref, rb_str_aref_mop_aref(ThreadContext context, IRubyObject arg1, IRubyObject arg2) op_aref19(ThreadContext context, IRubyObject arg) Deprecated.op_aref19(ThreadContext context, IRubyObject arg1, IRubyObject arg2) Deprecated.private IRubyObjectop_aset(ThreadContext context, int idx, IRubyObject arg1) op_aset(ThreadContext context, IRubyObject arg0, IRubyObject arg1) rb_str_aset, rb_str_aset_mop_aset(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) op_aset19(ThreadContext context, IRubyObject arg0, IRubyObject arg1) Deprecated.op_aset19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) Deprecated.final intop_cmp(RubyString other) rb_str_cmpop_cmp(ThreadContext context, IRubyObject other) op_equal(ThreadContext context, IRubyObject other) rb_str_equalop_equal19(ThreadContext context, IRubyObject other) Deprecated.private IRubyObjectop_equalCommon(ThreadContext context, IRubyObject other) op_format(ThreadContext context, IRubyObject arg) op_ge(ThreadContext context, IRubyObject other) op_ge19(ThreadContext context, IRubyObject other) op_gt(ThreadContext context, IRubyObject other) op_gt19(ThreadContext context, IRubyObject other) op_le(ThreadContext context, IRubyObject other) op_le19(ThreadContext context, IRubyObject other) op_lt(ThreadContext context, IRubyObject other) op_lt19(ThreadContext context, IRubyObject other) op_match(ThreadContext context, IRubyObject other) rb_str_matchop_match19(ThreadContext context, IRubyObject other) Deprecated.op_mul(ThreadContext context, IRubyObject other) op_mul19(ThreadContext context, IRubyObject other) op_plus(ThreadContext context, IRubyObject arg) op_plus19(ThreadContext context, IRubyObject arg) ord(ThreadContext context) partition(ThreadContext context, Block block) partition(ThreadContext context, IRubyObject arg, Block block) private RubyArraypartitionMismatch(Ruby runtime) private static intpatternSearch(ThreadContext context, IRubyObject pattern, RubyString str, int pos) final IRubyObjectplus_at()private voidpopulateCapturesForSplit(Ruby runtime, RubyArray result, RubyMatchData match) private static RubyString.EmptyByteListHolderprepareEmptyByteList(org.jcodings.Encoding enc) final RubyStringprepend(byte ch) final RubyStringprepend(int ch) prepend(ThreadContext context, IRubyObject other) rb_str_prependprepend(ThreadContext context, IRubyObject[] objs) rb_str_prependprivate voidraiseIndexOutOfString(int index) static IRubyObjectrbStrEscape(ThreadContext context, RubyString str) intrbStrOffset(int pos) private RubyArrayregexSplit(ThreadContext context, RubyRegexp pattern, boolean limit, int lim, int i) Call regexpSplit using a thread-local backref holder to avoid cross-thread pollution.replace(IRubyObject other) rb_str_replace_mreplace19(IRubyObject other) private RubyStringreplaceCommon(IRubyObject other) private IRubyObjectreplaceInternal(int beg, int len, RubyString repl) private voidreplaceInternal19(int beg, int len, RubyString repl) final voidresize(int size) rb_str_resizereverse(ThreadContext context) reverse_bang(ThreadContext context) reverse_bang19(ThreadContext context) reverse19(ThreadContext context) rindex(ThreadContext context, IRubyObject arg0) rb_str_rindex_mrindex(ThreadContext context, IRubyObject arg0, IRubyObject arg1) rindex19(ThreadContext context, IRubyObject arg0) Deprecated.rindex19(ThreadContext context, IRubyObject arg0, IRubyObject arg1) Deprecated.private IRubyObjectrindexCommon(ThreadContext context, IRubyObject sub, int pos) rjust(IRubyObject arg0) rjust(IRubyObject arg0, IRubyObject arg1) rjust19(IRubyObject arg0) Deprecated.rjust19(IRubyObject arg0, IRubyObject arg1) Deprecated.rpartition(ThreadContext context, IRubyObject arg) private IRubyObjectrpartitionMismatch(Ruby runtime) rstrip(ThreadContext context) rstrip_bang(ThreadContext context) rstrip_bang19(ThreadContext context) Deprecated.rstrip19(ThreadContext context) Deprecated.private RubyFixnumrubyLength(Ruby runtime) rubyLength(ThreadContext context) scan(ThreadContext context, IRubyObject pat, Block block) rb_str_scanscan19(ThreadContext context, IRubyObject arg, Block block) Deprecated.final intstatic intscanForCodeRange(ByteList bytes) private static longscanHex(byte[] bytes, int start, int len, int[] retlen) private static IRubyObjectscanOnce(ThreadContext context, RubyString str, IRubyObject pat, int[] startp) scrub(ThreadContext context, Block block) scrub(ThreadContext context, IRubyObject repl, Block block) scrub_bang(ThreadContext context, Block block) scrub_bang(ThreadContext context, IRubyObject repl, Block block) private static RubyMatchDatasetBackRefString(ThreadContext context, RubyString str, int pos, RubyString pattern) (package private) final voidsetbyte(ThreadContext context, IRubyObject index, IRubyObject val) final voidfinal voidsetCodeRange(int codeRange) voidsetEncoding(org.jcodings.Encoding encoding) final voidsetEncodingAndCodeRange(org.jcodings.Encoding enc, int cr) voidsetReadLength(int length) voidsetValue(CharSequence value) Deprecated.voidbooleanprivate IRubyObjectsingleByteLStrip(ThreadContext context, byte[] bytes, int s, int end) (package private) final boolean(package private) final booleansingleByteOptimizable(org.jcodings.Encoding enc) private IRubyObjectsingleByteRStrip(ThreadContext context) private static JavaSites.StringSitessites(ThreadContext context) intsize()slice_bang(ThreadContext context, IRubyObject arg0) rb_str_slice_bangslice_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1) slice_bang19(ThreadContext context, IRubyObject arg0) Deprecated.slice_bang19(ThreadContext context, IRubyObject arg0, IRubyObject arg1) Deprecated.private IRubyObjectsmartChopBangCommon(Ruby runtime) split(RubyRegexp delimiter) Split for ext (Java) callers (does not write $~).split(RubyRegexp delimiter, int limit) Split for ext (Java) callers (does not write $~).split(RubyString delimiter) Split for ext (Java) callers (does not write $~).split(RubyString delimiter, int limit) Split for ext (Java) callers (does not write $~).split(ThreadContext context) (package private) final RubyArraysplit(ThreadContext context, RubyRegexp spat, boolean useBackref) split(ThreadContext context, IRubyObject arg0) split(ThreadContext context, IRubyObject arg0, IRubyObject arg1) split19(IRubyObject spat, ThreadContext context, boolean useBackref) Deprecated.split19(ThreadContext context) Deprecated.split19(ThreadContext context, IRubyObject arg0) Deprecated.split19(ThreadContext context, IRubyObject arg0, boolean useBackref) Deprecated.split19(ThreadContext context, IRubyObject arg0, IRubyObject arg1) Deprecated.private RubyArraysplitCommon(ThreadContext context, IRubyObject spat, boolean limit, int lim, int i) splitWithBlock(ThreadContext context, Block block) splitWithBlock(ThreadContext context, IRubyObject arg0, Block block) splitWithBlock(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block) squeeze(ThreadContext context) rb_str_squeeze / rb_str_squeeze_bangsqueeze(ThreadContext context, IRubyObject arg) squeeze(ThreadContext context, IRubyObject[] args) squeeze_bang(ThreadContext context) squeeze_bang(ThreadContext context, IRubyObject arg) squeeze_bang(ThreadContext context, IRubyObject[] args) squeeze_bang19(ThreadContext context) Deprecated.squeeze_bang19(ThreadContext context, IRubyObject arg) Deprecated.squeeze_bang19(ThreadContext context, IRubyObject[] args) Deprecated.squeeze19(ThreadContext context) Deprecated.squeeze19(ThreadContext context, IRubyObject arg) Deprecated.squeeze19(ThreadContext context, IRubyObject[] args) Deprecated.start_with_p(ThreadContext context) start_with_p(ThreadContext context, IRubyObject arg) start_with_p(ThreadContext context, IRubyObject[] args) booleanstartsWith(RubyString str) str_eql_p(ThreadContext context, IRubyObject other) str_eql_p19(ThreadContext context, IRubyObject other) final RubyStringstrDup()Deprecated.final RubyString(package private) final RubyStringintstrHashCode(Ruby runtime) Generate a hash for the String, using its associated Ruby instance's hash seed.private RubyArraystringSplit(ThreadContext context, RubyString spat, boolean limit, int lim, int i) static byte[]stringToBytes(String string) final IRubyObjectstringToInum(int base) stringToInum(int base, boolean badcheck) rb_str_to_inumfinal IRubyObjectstringToInum19(int base, boolean badcheck) Deprecated.static RubyStringstringValue(IRubyObject object) strip(ThreadContext context) strip_bang(ThreadContext context) strip_bang19(ThreadContext context) Deprecated.strip19(ThreadContext context) Deprecated.final int(package private) final intprivate intstrOffset(int nth, boolean singlebyte) strScrub(ThreadContext context, IRubyObject repl, Block block) Scrub the contents of this string, replacing invalid characters as appropriate.private intstrseqIndex(RubyString sub, int offset, boolean inBytes) sub(ThreadContext context, IRubyObject arg0, Block block) rb_str_sub / rb_str_sub_bangsub(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block) sub_bang(ThreadContext context, IRubyObject arg0, Block block) sub_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block) sub_bang19(ThreadContext context, IRubyObject arg0, Block block) Deprecated.sub_bang19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block) Deprecated.sub19(ThreadContext context, IRubyObject arg0, Block block) Deprecated.sub19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block) Deprecated.private RubyStringsubBangCommon(ThreadContext context, int beg, int end, RubyString repl, int tuFlags) final IRubyObjectsubBangFast(ThreadContext context, RubyRegexp regexp, RubyString repl) sub! but without any frame globals ...private IRubyObjectsubBangIter(ThreadContext context, RubyRegexp regexp, RubyHash hash, Block block) private IRubyObjectsubBangIter(ThreadContext context, RubyString pattern, RubyHash hash, Block block) private IRubyObjectsubBangIter(ThreadContext context, IRubyObject arg0, RubyHash hash, Block block) private RubyMatchDatasubBangMatch(ThreadContext context, RubyRegexp regexp, RubyString repl) private IRubyObjectsubBangNoIter(ThreadContext context, RubyRegexp regexp, RubyString repl) private IRubyObjectsubBangNoIter(ThreadContext context, RubyString pattern, RubyString repl) private IRubyObjectsubBangNoIter(ThreadContext context, IRubyObject arg0, RubyString repl) private org.jcodings.EncodingsubBangVerifyEncoding(ThreadContext context, RubyString repl, int beg, int end) (package private) final intsubLength(int pos) private IRubyObjectsubpat(ThreadContext context, RubyRegexp regex) private IRubyObjectsubpat(ThreadContext context, RubyRegexp regex, IRubyObject backref) private voidsubpatSet(ThreadContext context, RubyRegexp regexp, IRubyObject backref, IRubyObject repl) private intsubpatSetCheck(Ruby runtime, int nth, org.joni.Region regs) subSequence(int start, int end) final IRubyObjectsubstr(int beg, int len) Deprecated.final IRubyObjectfinal IRubyObjectsucc(ThreadContext context) Deprecated.succ19(ThreadContext context) Deprecated.sum(ThreadContext context) sum(ThreadContext context, IRubyObject arg) sumCommon(ThreadContext context, long bits) swapcase(ThreadContext context) swapcase(ThreadContext context, IRubyObject arg) swapcase(ThreadContext context, IRubyObject arg0, IRubyObject arg1) swapcase_bang(ThreadContext context) private IRubyObjectswapcase_bang(ThreadContext context, int flags) swapcase_bang(ThreadContext context, IRubyObject arg) swapcase_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1) swapcase_bang19(ThreadContext context) Deprecated.swapcase19(ThreadContext context) Deprecated.to_c(ThreadContext context) string_to_cto_f()rb_str_to_fto_f19()Deprecated.to_i()rb_str_to_ito_i(IRubyObject arg0) rb_str_to_ito_i19()Deprecated.to_i19(IRubyObject arg0) Deprecated.to_r(ThreadContext context) string_to_rto_s()rb_any_to_s call-seq: obj.to_s => string Returns a string representing obj.final org.jcodings.EncodingtoEncoding(Ruby runtime) <T> TConvert the object to the specified Java class, if possible.toString()The default toString method is just a wrapper that calls the Ruby "to_s" method.tr(ThreadContext context, IRubyObject src, IRubyObject repl) rb_str_tr / rb_str_tr_bangtr_bang(ThreadContext context, IRubyObject src, IRubyObject repl) tr_bang19(ThreadContext context, IRubyObject src, IRubyObject repl) tr_s(ThreadContext context, IRubyObject src, IRubyObject repl) rb_str_tr_s / rb_str_tr_s_bangtr_s_bang(ThreadContext context, IRubyObject src, IRubyObject repl) tr_s_bang19(ThreadContext context, IRubyObject src, IRubyObject repl) tr_s19(ThreadContext context, IRubyObject src, IRubyObject repl) tr19(ThreadContext context, IRubyObject src, IRubyObject repl) private IRubyObjecttrTrans19(ThreadContext context, IRubyObject src, IRubyObject repl, boolean sflag) static IRubyObjecttry_convert(ThreadContext context, IRubyObject recv, IRubyObject str) undump(ThreadContext context) private voidundumpAfterBackslash(Ruby runtime, byte[] ssBytes, int[] ss, int s_end, org.jcodings.Encoding[] penc, boolean[] utf8, boolean[] binary) private static byteunescapeAscii(byte c) static RubyStringunmarshalFrom(UnmarshalStream input) unpack(IRubyObject obj) Deprecated.unpack(ThreadContext context, IRubyObject obj, Block block) unpack1(ThreadContext context, IRubyObject obj, Block block) intunseededStrHashCode(Ruby runtime) Generate a hash for the String, without a seed.upcase(ThreadContext context) upcase(ThreadContext context, IRubyObject arg) upcase(ThreadContext context, IRubyObject arg0, IRubyObject arg1) upcase_bang(ThreadContext context) private IRubyObjectupcase_bang(ThreadContext context, int flags) upcase_bang(ThreadContext context, IRubyObject arg) upcase_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1) upcase_bang19(ThreadContext context) Deprecated.upcase19(ThreadContext context) Deprecated.final IRubyObjectupto(ThreadContext context, IRubyObject end, Block block) rb_str_upto_mfinal IRubyObjectupto(ThreadContext context, IRubyObject end, IRubyObject excl, Block block) final IRubyObjectupto19(ThreadContext context, IRubyObject end, Block block) Deprecated.final IRubyObjectupto19(ThreadContext context, IRubyObject end, IRubyObject excl, Block block) Deprecated.(package private) final IRubyObjectuptoCommon(ThreadContext context, RubyString end, boolean excl, Block block, boolean asSymbol) (package private) final IRubyObjectuptoCommon(ThreadContext context, IRubyObject arg, boolean excl, Block block) private IRubyObjectuptoCommonNoDigits(ThreadContext context, RubyString end, boolean excl, Block block, boolean asSymbol) (package private) final IRubyObjectuptoEndless(ThreadContext context, Block block) valid_encoding_p(ThreadContext context) private voidview(byte[] bytes, boolean copy) private voidview(int index, int len) final voidMethods inherited from class org.jruby.RubyObject
attachToObjectSpace, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, convertToType, createObjectClass, dig, dig1, dig2, eqlInternal, equalInternal, inspect, op_eqq, puts, specificEval, toRubyStringMethods inherited from class org.jruby.RubyBasicObject
addFinalizer, 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, defaultToJava, 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, getMetaClass, getNativeHandle, getNativeTypeIndex, getObjectId, getRuntime, getSingletonClass, getSingletonClassClone, getSingletonClassCloneAndAttach, getType, getVariable, getVariableCount, getVariableList, getVariableNameList, hashyInspect, hasInstanceVariable, hasInstanceVariables, hasInternalVariable, hasVariables, id, infectBy, infectBy, infectBy, initialize19, 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, isSpecialObject, isTaint, isTrue, isUntrusted, kind_of_p, makeMetaClass, method, method_missing, method_missing19, method19, methods, methods, methods19, methodsImpl, nil_p, nonFixnumHashCode, OBJ_INIT_COPY, objInitCopy, op_equal_19, op_not, op_not_equal, op_not_match, private_methods, private_methods19, protected_methods, protected_methods19, public_methods, public_methods19, rbClone, rbClone, rbInspect, recacheBuiltinMethods, remove_instance_variable, removeFinalizers, removeInstanceVariable, removeInternalVariable, respond_to_p, 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, singleton_method_added, singleton_method_added19, singleton_method_removed, singleton_method_removed19, singleton_method_undefined, singleton_method_undefined19, singleton_methods, specificEval, specificEval, specificEval, specificEval, syncVariables, syncVariables, taint, taint, tainted, tainted_p, testFrozen, testFrozen, to_a, to_a, trust, type, type_deprecated, untaint, untrust, untrusted_p, validateInstanceVariable, validateInstanceVariable, validateInstanceVariable, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableRemove, variableTableStore, variableTableSync, yieldUnder, yieldUnderMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.CharSequence
chars, codePoints
-
Field Details
-
DEBUG_INFO_FIELD
- See Also:
-
ASCII
static final org.jcodings.specific.ASCIIEncoding ASCII -
UTF8
static final org.jcodings.specific.UTF8Encoding UTF8 -
SHARE_LEVEL_NONE
private static final int SHARE_LEVEL_NONE- See Also:
-
SHARE_LEVEL_BUFFER
private static final int SHARE_LEVEL_BUFFER- See Also:
-
SHARE_LEVEL_BYTELIST
private static final int SHARE_LEVEL_BYTELIST- See Also:
-
SCRUB_REPL_UTF8
private static final byte[] SCRUB_REPL_UTF8 -
SCRUB_REPL_ASCII
private static final byte[] SCRUB_REPL_ASCII -
SCRUB_REPL_UTF16BE
private static final byte[] SCRUB_REPL_UTF16BE -
SCRUB_REPL_UTF16LE
private static final byte[] SCRUB_REPL_UTF16LE -
SCRUB_REPL_UTF32BE
private static final byte[] SCRUB_REPL_UTF32BE -
SCRUB_REPL_UTF32LE
private static final byte[] SCRUB_REPL_UTF32LE -
FORCE_ENCODING_BYTES
private static final byte[] FORCE_ENCODING_BYTES -
NULL_ARRAY
-
value
-
EMPTY_ASCII8BIT_BYTELIST
-
EMPTY_USASCII_BYTELIST
-
EMPTY_BYTELISTS
-
hexdigit
private static final byte[] hexdigit -
REPL_MOCK_REGEX
private static final org.joni.Regex REPL_MOCK_REGEXA Regex instance is required to satisfy the type signature of RubyRegexp.regsub In the code paths possible for a string pattern a single instance of a blank regex is enough. -
SPACE_BYTELIST
-
GRAPHEME_CLUSTER_PATTERN
-
UNDERSCORE
-
-
Constructor Details
-
RubyString
-
RubyString
-
RubyString
-
RubyString
-
RubyString
-
RubyString
-
RubyString
-
RubyString
-
RubyString
-
RubyString
-
RubyString
-
-
Method Details
-
createStringClass
-
getEncoding
public org.jcodings.Encoding getEncoding()- Specified by:
getEncodingin interfaceEncodingCapable
-
setEncoding
public void setEncoding(org.jcodings.Encoding encoding) - Specified by:
setEncodingin interfaceEncodingCapable
-
shouldMarshalEncoding
public boolean shouldMarshalEncoding()- Specified by:
shouldMarshalEncodingin interfaceMarshalEncoding
-
getMarshalEncoding
public org.jcodings.Encoding getMarshalEncoding()- Specified by:
getMarshalEncodingin interfaceMarshalEncoding
-
associateEncoding
public void associateEncoding(org.jcodings.Encoding enc) -
setEncodingAndCodeRange
public final void setEncodingAndCodeRange(org.jcodings.Encoding enc, int cr) -
toEncoding
-
getCodeRange
public final int getCodeRange()- Specified by:
getCodeRangein interfaceCodeRangeable
-
setCodeRange
public final void setCodeRange(int codeRange) - Specified by:
setCodeRangein interfaceCodeRangeable
-
clearCodeRange
public final void clearCodeRange()- Specified by:
clearCodeRangein interfaceCodeRangeable
-
keepCodeRange
public final void keepCodeRange()- Specified by:
keepCodeRangein interfaceCodeRangeable
-
isCodeRangeAsciiOnly
public final boolean isCodeRangeAsciiOnly() -
isAsciiOnly
public final boolean isAsciiOnly() -
isCodeRangeValid
public final boolean isCodeRangeValid()- Specified by:
isCodeRangeValidin interfaceCodeRangeable
-
isCodeRangeBroken
public final boolean isCodeRangeBroken() -
isBrokenString
public final boolean isBrokenString() -
copyCodeRangeForSubstr
-
scanForCodeRange
public final int scanForCodeRange()- Specified by:
scanForCodeRangein interfaceCodeRangeable
-
scanForCodeRange
-
singleByteOptimizable
final boolean singleByteOptimizable() -
singleByteOptimizable
final boolean singleByteOptimizable(org.jcodings.Encoding enc) -
isCompatibleWith
-
checkEncoding
-
checkEncoding
-
checkEncoding
- Specified by:
checkEncodingin interfaceCodeRangeable
-
checkEncoding
-
checkDummyEncoding
private org.jcodings.Encoding checkDummyEncoding() -
strLength
public final int strLength() -
strLength
-
subLength
final int subLength(int pos) -
eql
short circuit for String key comparison- Specified by:
eqlin interfaceIRubyObject- Overrides:
eqlin classRubyBasicObject
-
eql19
-
newString
Deprecated.Create a new String which uses the same Ruby runtime and the same class like this String. This method should be used to satisfy RCR #38. -
newString
Deprecated.Create a new String which uses the same Ruby runtime and the same class like this String. This method should be used to satisfy RCR #38. -
newString
Deprecated. -
newStringLight
-
newStringLight
-
newStringLight
-
newString
-
newString
-
newString
-
newString
-
newBinaryString
-
newBinaryString
-
newUSASCIIString
-
newString
-
newString
-
newString
public static RubyString newString(Ruby runtime, byte[] bytes, int start, int length, org.jcodings.Encoding encoding) -
newString
-
newString
-
newString
-
newString
-
newUnicodeString
-
newUTF8String
-
newUTF16String
-
newUnicodeString
-
newUTF8String
-
newUTF16String
-
newInternalFromJavaExternal
Return a new Ruby String encoded as the default internal encoding given a Java String that has come from an external source. If there is no default internal encoding set, the Ruby String will be encoded using Java's default external encoding. If an internal encoding is set, that encoding will be used for the Ruby String.- Parameters:
runtime-str-- Returns:
-
newExternalStringWithEncoding
@Deprecated public static RubyString newExternalStringWithEncoding(Ruby runtime, String string, org.jcodings.Encoding encoding) Deprecated. -
newEmptyString
-
newAllocatedString
-
newEmptyString
-
newStringNoCopy
-
newStringNoCopy
-
newStringNoCopy
-
newStringNoCopy
-
independent
public final boolean independent() -
makeIndependent
-
makeIndependent
-
export
-
getEmptyByteList
-
prepareEmptyByteList
-
newEmptyString
public static RubyString newEmptyString(Ruby runtime, RubyClass metaClass, org.jcodings.Encoding enc) -
newEmptyString
-
newStringNoCopy
public static RubyString newStringNoCopy(Ruby runtime, RubyClass clazz, ByteList bytes, org.jcodings.Encoding enc, int cr) -
newStringNoCopy
public static RubyString newStringNoCopy(Ruby runtime, ByteList bytes, org.jcodings.Encoding enc, int cr) -
newUsAsciiStringNoCopy
-
getNativeClassIndex
Description copied from class:RubyObjectThis is overridden in the other concrete Java builtins to provide a fast way to determine what type they are. Will generally return a value from org.jruby.runtime.ClassIndex- Specified by:
getNativeClassIndexin interfaceCoreObjectType- Overrides:
getNativeClassIndexin classRubyObject- See Also:
-
getJavaClass
Description copied from class:RubyBasicObjectWill return the Java interface that most closely can represent this object, when working through Java integration translations.- Specified by:
getJavaClassin interfaceIRubyObject- Overrides:
getJavaClassin classRubyBasicObject- Returns:
- the true Java class of this (Ruby) object
-
convertToString
Description copied from class:RubyBasicObjectTries to convert this object to a Ruby String using the "to_str" method.- Specified by:
convertToStringin interfaceIRubyObject- Overrides:
convertToStringin classRubyBasicObject- Returns:
- a string representation of this
-
toString
Description copied from class:RubyObjectThe default toString method is just a wrapper that calls the Ruby "to_s" method.- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classRubyObject
-
decodeString
Convert this Ruby string to a Java String. This version is encoding-aware.- Returns:
- A decoded Java String, based on this Ruby string's encoding.
-
dup
Overridden dup for fast-path logic.- Specified by:
dupin interfaceIRubyObject- Overrides:
dupin classRubyBasicObject- Returns:
- A new RubyString sharing the original backing store.
-
dupFrozen
-
strDup
-
strDup
-
modifyCheck
public final void modifyCheck()Check that the string can be modified, raising error otherwise. If you plan to modify a string with shared backing store, this method is not sufficient; you will need to call modify() instead. -
modifyCheck
public void modifyCheck(byte[] b, int len) -
modifyCheck
private void modifyCheck(byte[] b, int len, org.jcodings.Encoding enc) -
frozenCheck
private void frozenCheck() -
frozenCheck
private void frozenCheck(boolean runtimeError) -
modify
public final void modify()rb_str_modify- Specified by:
modifyin interfaceByteListHolder
-
modify19
public final void modify19() -
modifyAndKeepCodeRange
public void modifyAndKeepCodeRange()- Specified by:
modifyAndKeepCodeRangein interfaceCodeRangeable
-
modify
public final void modify(int length) rb_str_modify (with length bytes ensured)- Specified by:
modifyin interfaceByteListHolder
-
modifyExpand
public final void modifyExpand(int length) rb_str_modify_expand -
setReadLength
public void setReadLength(int length) -
newFrozen
-
resize
public final void resize(int size) rb_str_resize -
view
-
view
private void view(byte[] bytes, boolean copy) -
view
private void view(int index, int len) -
bytesToString
-
byteListToString
-
bytesToString
-
stringToBytes
-
asString
Description copied from class:RubyBasicObjectrb_obj_as_string First converts this object into a String using the "to_s" method, infects it with the current taint and returns it. If to_s doesn't return a Ruby String,RubyBasicObject.anyToString()is used instead.- Specified by:
asStringin interfaceIRubyObject- Overrides:
asStringin classRubyBasicObject- Returns:
-
checkStringType
Description copied from class:RubyBasicObjectrb_check_string_type Tries to return a coerced string representation of this object, using "to_str". If that returns something other than a String or nil, an empty String will be returned.- Specified by:
checkStringTypein interfaceIRubyObject- Overrides:
checkStringTypein classRubyBasicObject- Returns:
- nil if type check failed
-
try_convert
-
to_s
Description copied from class:RubyBasicObjectrb_any_to_s call-seq: obj.to_s => string Returns a string representing obj. The defaultto_sprints 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.''- Overrides:
to_sin classRubyBasicObject
-
compareTo
Description copied from class:RubyBasicObjectCompares this Ruby object with another.- Specified by:
compareToin interfaceComparable<IRubyObject>- Overrides:
compareToin classRubyBasicObject- Parameters:
other- another IRubyObject- Returns:
- 0 if equal, < 0 if this is less than other, > 0 if this is greater than other
-
op_cmp
- Overrides:
op_cmpin classRubyBasicObject
-
op_equal
rb_str_equal- Specified by:
op_equalin interfaceIRubyObject- Overrides:
op_equalin classRubyBasicObject
-
op_equalCommon
-
minus_at
-
plus_at
-
op_plus
-
op_plus19
-
op_mul
-
op_mul19
-
multiplyByteList
-
op_format
-
hash
Description copied from class:RubyBasicObjectrb_obj_id Will return the hash code of this object. In comparison to MRI, this method will use the Java identity hash code instead of using rb_obj_id, since the usage of id in JRuby will incur the cost of some. ObjectSpace maintenance.- Overrides:
hashin classRubyBasicObject
-
hashCode
public int hashCode()Description copied from class:RubyObjectThis override does not do "checked" dispatch since Object usually has #hash defined.- Overrides:
hashCodein classRubyObject- See Also:
-
strHashCode
Generate a hash for the String, using its associated Ruby instance's hash seed.- Parameters:
runtime-- Returns:
-
unseededStrHashCode
Generate a hash for the String, without a seed.- Parameters:
runtime-- Returns:
-
equals
Description copied from class:RubyObjectThis override does not do a "checked" dispatch.- Overrides:
equalsin classRubyObject- See Also:
-
equals
-
objAsString
rb_obj_as_string -
op_cmp
rb_str_cmp -
asJavaString
rb_to_id- Specified by:
asJavaStringin interfaceIRubyObject- Overrides:
asJavaStringin classRubyBasicObject- Returns:
- a (Java) string
-
doClone
-
cat
-
cat
-
cat19
-
cat
-
cat19
-
catString
-
cat
-
cat
-
cat
-
cat
-
cat
-
cat
public final int cat(byte[] bytes, int p, int len, org.jcodings.Encoding enc) -
catAscii
-
replace
rb_str_replace_m -
initialize_copy
Description copied from class:RubyBasicObjectrb_obj_init_copy Initializes this object as a copy of the original, that is the parameter to this object. Will make sure that the argument actually has the same real class as this object. It shouldn't be possible to initialize an object with something totally different.- Overrides:
initialize_copyin classRubyBasicObject
-
replace19
-
replaceCommon
-
clear
-
reverse
-
reverse19
-
reverse_bang
-
reverse_bang19
-
newInstance
rb_str_s_new -
initialize
- Overrides:
initializein classRubyBasicObject
-
initialize
-
initialize
-
initialize
-
initialize19
Deprecated. -
casecmp19
Deprecated. -
casecmp
-
casecmp_p
-
op_match
rb_str_match- Overrides:
op_matchin classRubyBasicObject
-
match
String#match(pattern) rb_str_match_m- Parameters:
pattern- Regexp or String
-
match19
-
match19
public IRubyObject match19(ThreadContext context, IRubyObject pattern, IRubyObject pos, Block block) -
match19
-
match_p
-
match_p
-
op_ge
-
op_ge19
-
op_gt
-
op_gt19
-
op_le
-
op_le19
-
op_lt
-
op_lt19
-
cmpIsBuiltin
-
str_eql_p
-
str_eql_p19
-
caseMap
-
upcase19
Deprecated.rb_str_upcase / rb_str_upcase_bang -
upcase_bang19
Deprecated. -
upcase
-
upcase
-
upcase
-
upcase_bang
-
upcase_bang
-
upcase_bang
-
upcase_bang
-
downcase19
Deprecated.rb_str_downcase / rb_str_downcase_bang -
downcase_bang19
Deprecated. -
downcase
-
downcase
-
downcase
-
downcase_bang
-
downcase_bang
-
downcase_bang
-
downcase_bang
-
swapcase19
Deprecated.rb_str_swapcase / rb_str_swapcase_bang -
swapcase_bang19
Deprecated. -
swapcase
-
swapcase
-
swapcase
-
swapcase_bang
-
swapcase_bang
-
swapcase_bang
-
swapcase_bang
-
capitalize19
Deprecated.rb_str_capitalize / rb_str_capitalize_bang -
capitalize_bang19
Deprecated. -
capitalize
-
capitalize
-
capitalize
-
capitalize_bang
-
capitalize_bang
-
capitalize_bang
-
capitalize_bang
-
dump
rb_str_dump -
undump
-
invalidFormat
-
undumpAfterBackslash
private void undumpAfterBackslash(Ruby runtime, byte[] ssBytes, int[] ss, int s_end, org.jcodings.Encoding[] penc, boolean[] utf8, boolean[] binary) -
scanHex
private static long scanHex(byte[] bytes, int start, int len, int[] retlen) -
unescapeAscii
private static byte unescapeAscii(byte c) -
insert
-
checkIndex
private int checkIndex(int beg, int len) -
checkIndexForRef
private int checkIndexForRef(int beg, int len) -
checkLength
private int checkLength(int len) -
raiseIndexOutOfString
private void raiseIndexOutOfString(int index) -
inspect
rb_str_inspect- Specified by:
inspectin interfaceIRubyObject- Overrides:
inspectin classRubyBasicObject- Returns:
- String
-
inspect
-
inspect19
Deprecated. -
rbStrEscape
-
inspect19
Deprecated. -
inspect
-
size
public int size() -
rubyLength
-
rubyLength
-
length19
Deprecated. -
bytesize
-
length
public int length()- Specified by:
lengthin interfaceCharSequence
-
charAt
public char charAt(int offset) - Specified by:
charAtin interfaceCharSequence
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-
byteSize
A byte size method suitable for lambda method reference implementation ofRubyEnumerator.SizeFn.size(ThreadContext, IRubyObject, IRubyObject[]) -
empty_p
rb_str_empty -
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCharSequence
-
append
rb_str_append -
append
-
append19
-
appendAsDynamicString
-
append19
-
concatSingle
rb_str_concat -
concat
rb_str_concat -
concat
rb_str_concat_multi -
concat
-
concat19
Deprecated. -
concatNumeric
-
prepend
rb_str_prepend -
prepend
rb_str_prepend -
prepend
-
prepend
-
crypt
rb_str_crypt -
stringValue
-
sub19
Deprecated. -
sub19
@Deprecated public IRubyObject sub19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block) Deprecated. -
sub_bang19
Deprecated. -
sub_bang19
@Deprecated public IRubyObject sub_bang19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block) Deprecated. -
sub
rb_str_sub / rb_str_sub_bang -
sub
-
sub_bang
-
sub_bang
-
asRegexpArg
-
subBangIter
private IRubyObject subBangIter(ThreadContext context, IRubyObject arg0, RubyHash hash, Block block) -
subBangIter
private IRubyObject subBangIter(ThreadContext context, RubyString pattern, RubyHash hash, Block block) -
subBangIter
private IRubyObject subBangIter(ThreadContext context, RubyRegexp regexp, RubyHash hash, Block block) -
subBangNoIter
-
subBangNoIter
-
subBangNoIter
-
subBangFast
sub! but without any frame globals ...- Parameters:
context-regexp-repl-- Returns:
- sub result
-
subBangMatch
-
subBangCommon
private RubyString subBangCommon(ThreadContext context, int beg, int end, RubyString repl, int tuFlags) -
subBangVerifyEncoding
private org.jcodings.Encoding subBangVerifyEncoding(ThreadContext context, RubyString repl, int beg, int end) -
gsub19
Deprecated. -
gsub19
@Deprecated public IRubyObject gsub19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block) Deprecated. -
gsub_bang19
Deprecated. -
gsub_bang19
@Deprecated public IRubyObject gsub_bang19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block) Deprecated. -
gsub
-
gsub
-
gsub_bang
-
gsub_bang
public IRubyObject gsub_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block) -
gsubImpl
private IRubyObject gsubImpl(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block, boolean bang) -
gsubFast
-
gsubCommon
private IRubyObject gsubCommon(ThreadContext context, Block block, RubyString repl, RubyHash hash, IRubyObject arg0, boolean bang, int tuFlags) -
gsubCommon
private IRubyObject gsubCommon(ThreadContext context, Block block, RubyString repl, RubyHash hash, IRubyObject arg0, boolean bang, int tuFlags, boolean useBackref) -
gsubCommon
private IRubyObject gsubCommon(ThreadContext context, Block block, RubyString repl, RubyHash hash, RubyString pattern, boolean bang, int tuFlags, boolean useBackref) -
gsubCommon
private IRubyObject gsubCommon(ThreadContext context, Block block, RubyString repl, RubyHash hash, RubyRegexp regexp, boolean bang, int tuFlags, boolean useBackref) -
index
rb_str_index_m -
index
-
index19
Deprecated. -
index19
Deprecated. -
indexCommon19
-
strseqIndex
-
rindex19
Deprecated. -
rindex19
Deprecated. -
rindex
rb_str_rindex_m -
rindex
-
rindexCommon
-
substr
Deprecated. -
substr
-
byteSubstr
-
byteARef
-
substr19
-
multibyteSubstr19
private IRubyObject multibyteSubstr19(Ruby runtime, org.jcodings.Encoding enc, int len, int beg, int length) -
multibyteCharAt
private char multibyteCharAt(org.jcodings.Encoding enc, int beg, int length) -
replaceInternal
-
replaceInternal19
-
op_aref
rb_str_aref, rb_str_aref_m -
op_aref
-
byteslice
-
byteslice
-
op_aref
-
subpatSetCheck
-
subpatSet
private void subpatSet(ThreadContext context, RubyRegexp regexp, IRubyObject backref, IRubyObject repl) -
subpat
-
subpat
-
op_aset
rb_str_aset, rb_str_aset_m -
op_aset
-
op_aset
public IRubyObject op_aset(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) -
slice_bang19
Deprecated. -
slice_bang19
@Deprecated public IRubyObject slice_bang19(ThreadContext context, IRubyObject arg0, IRubyObject arg1) Deprecated. -
slice_bang
rb_str_slice_bang -
slice_bang
-
succ19
Deprecated. -
succ_bang19
Deprecated. -
succ
-
succ_bang
-
upto19
Deprecated. -
upto19
@Deprecated public final IRubyObject upto19(ThreadContext context, IRubyObject end, IRubyObject excl, Block block) Deprecated. -
upto
rb_str_upto_m -
upto
public final IRubyObject upto(ThreadContext context, IRubyObject end, IRubyObject excl, Block block) -
uptoCommon
-
uptoCommon
final IRubyObject uptoCommon(ThreadContext context, RubyString end, boolean excl, Block block, boolean asSymbol) -
uptoCommonNoDigits
private IRubyObject uptoCommonNoDigits(ThreadContext context, RubyString end, boolean excl, Block block, boolean asSymbol) -
uptoEndless
-
include_p19
Deprecated. -
include_p
rb_str_include -
chr
-
getbyte
-
setbyte
-
to_i
rb_str_to_i -
to_i
rb_str_to_i -
to_i19
Deprecated. -
to_i19
Deprecated. -
stringToInum
rb_str_to_inum -
stringToInum
-
stringToInum19
Deprecated. -
oct
rb_str_oct -
oct19
Deprecated. -
hex
rb_str_hex -
hex19
Deprecated. -
to_f
rb_str_to_f -
to_f19
Deprecated. -
split19
Deprecated.rb_str_split_m -
split19
Deprecated. -
split19
Deprecated. -
populateCapturesForSplit
-
split
-
split
-
splitWithBlock
-
splitWithBlock
-
split
-
splitWithBlock
public IRubyObject splitWithBlock(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block) -
split19
Deprecated. -
split
Split for ext (Java) callers (does not write $~).- Parameters:
delimiter-- Returns:
- splited entries
-
split
Split for ext (Java) callers (does not write $~).- Parameters:
delimiter-limit-- Returns:
- splited entries
-
split
Split for ext (Java) callers (does not write $~).- Parameters:
delimiter-- Returns:
- splited entries
-
split
Split for ext (Java) callers (does not write $~).- Parameters:
delimiter-limit-- Returns:
- splited entries
-
doSplit
-
split
-
splitCommon
private RubyArray splitCommon(ThreadContext context, IRubyObject spat, boolean limit, int lim, int i) -
regexSplit
private RubyArray regexSplit(ThreadContext context, RubyRegexp pattern, boolean limit, int lim, int i) Call regexpSplit using a thread-local backref holder to avoid cross-thread pollution. -
awkSplit
-
stringSplit
private RubyArray stringSplit(ThreadContext context, RubyString spat, boolean limit, int lim, int i) -
indexOf
static int indexOf(byte[] source, int sourceOffset, int sourceCount, byte[] target, int targetOffset, int targetCount, int fromIndex, org.jcodings.Encoding enc) -
getStringForPattern
-
getPattern
get_pat (used by match/match19) -
getPatternQuoted
-
scan
rb_str_scan -
mustnotBroken
-
scanOnce
private static IRubyObject scanOnce(ThreadContext context, RubyString str, IRubyObject pat, int[] startp) -
patternSearch
private static int patternSearch(ThreadContext context, IRubyObject pattern, RubyString str, int pos) -
setBackRefString
private static RubyMatchData setBackRefString(ThreadContext context, RubyString str, int pos, RubyString pattern) -
start_with_p
-
start_with_p
-
start_with_p
-
startsWith
-
end_with_p
-
end_with_p
-
end_with_p
-
endWith
-
endsWithAsciiChar
public boolean endsWithAsciiChar(char c) -
delete_prefix
-
delete_suffix
-
delete_prefix_bang
-
delete_suffix_bang
-
deletedPrefixLength
-
deletedSuffixLength
-
justify
-
justify
-
justifyCommon
private RubyString justifyCommon(Ruby runtime, ByteList pad, int padCharLen, boolean padSinglebyte, org.jcodings.Encoding enc, int width, int jflag) -
ljust19
Deprecated.rb_str_ljust -
ljust19
Deprecated. -
ljust
-
ljust
-
rjust19
Deprecated.rb_str_rjust -
rjust19
Deprecated. -
rjust
-
rjust
-
center19
Deprecated.rb_str_center -
center19
Deprecated. -
center
-
center
-
partition
-
partition
-
partitionMismatch
-
rpartition
-
rpartitionMismatch
-
chop19
Deprecated.rb_str_chop / rb_str_chop_bang -
chop_bang19
Deprecated. -
chop
-
chop_bang
-
chomp
-
chomp
-
chomp_bang
rb_str_chomp_bang In the common case, removes CR and LF characters in various ways depending on the value of the optional args[0]. If args.length==0 removes one instance of CR, CRLF or LF from the end of the string. If args.length>0 and args[0] is "\n" then same behaviour as args.length==0 . If args.length>0 and args[0] is "" then removes trailing multiple LF or CRLF (but no CRs at all(!)). -
chomp_bang
-
chomp19
-
chomp19
-
chomp_bang19
-
chomp_bang19
-
chompBangCommon
-
smartChopBangCommon
-
lstrip19
Deprecated.rb_str_lstrip / rb_str_lstrip_bang -
lstrip_bang19
Deprecated. -
lstrip
-
lstrip_bang
-
singleByteLStrip
-
multiByteLStrip
private IRubyObject multiByteLStrip(ThreadContext context, org.jcodings.Encoding enc, byte[] bytes, int s, int end) -
rstrip19
Deprecated.rb_str_rstrip / rb_str_rstrip_bang -
rstrip_bang19
Deprecated. -
rstrip
-
rstrip_bang
-
singleByteRStrip
-
multiByteRStrip
-
strip19
Deprecated.rb_str_strip / rb_str_strip_bang -
strip_bang19
Deprecated. -
strip
-
strip_bang
-
count19
Deprecated. -
count19
Deprecated. -
count19
Deprecated. -
count
-
count
-
count
-
delete
rb_str_delete / rb_str_delete_bang -
delete
-
delete
-
delete_bang
-
delete_bang
-
delete_bang
-
delete19
Deprecated. -
delete19
Deprecated. -
delete19
Deprecated. -
delete_bang19
Deprecated. -
delete_bang19
Deprecated. -
delete_bang19
Deprecated. -
squeeze
rb_str_squeeze / rb_str_squeeze_bang -
squeeze
-
squeeze
-
squeeze_bang
-
squeeze_bang
-
squeeze_bang
-
squeeze19
Deprecated. -
squeeze19
Deprecated. -
squeeze19
Deprecated. -
squeeze_bang19
Deprecated. -
squeeze_bang19
Deprecated. -
squeeze_bang19
Deprecated. -
tr
rb_str_tr / rb_str_tr_bang -
tr_bang
-
tr19
-
tr_bang19
-
trTrans19
private IRubyObject trTrans19(ThreadContext context, IRubyObject src, IRubyObject repl, boolean sflag) -
tr_s
rb_str_tr_s / rb_str_tr_s_bang -
tr_s_bang
-
tr_s19
-
tr_s_bang19
-
each_line
rb_str_each_line -
each_line
-
each_line
-
each_lineCommon
Deprecated. -
each_line19
Deprecated. -
each_line19
Deprecated. -
lines
-
lines
-
each_byte
rb_str_each_byte -
each_byte19
Deprecated. -
bytes
-
each_char
-
chars
-
each_char19
Deprecated. -
chars19
Deprecated. -
eachCharSize
A character size method suitable for lambda method reference implementation ofRubyEnumerator.SizeFn.size(ThreadContext, IRubyObject, IRubyObject[]) -
each_codepoint
rb_str_each_codepoint -
codepoints
-
enumerateChars
private IRubyObject enumerateChars(ThreadContext context, String name, Block block, boolean wantarray) -
enumerateCodepoints
private IRubyObject enumerateCodepoints(ThreadContext context, String name, Block block, boolean wantarray) -
enumerateBytes
private IRubyObject enumerateBytes(ThreadContext context, String name, Block block, boolean wantarray) -
codepointSize
private static IRubyObject codepointSize(ThreadContext context, RubyString recv, IRubyObject[] args) A codepoint size method suitable for lambda method reference implementation ofRubyEnumerator.SizeFn.size(ThreadContext, IRubyObject, IRubyObject[]) -
eachGraphemeClusterSize
private static IRubyObject eachGraphemeClusterSize(ThreadContext context, RubyString self, IRubyObject[] args) A grapheme cluster size method suitable for lambda method reference implementation ofRubyEnumerator.SizeFn.size(ThreadContext, IRubyObject, IRubyObject[]) -
enumerateGraphemeClusters
private IRubyObject enumerateGraphemeClusters(ThreadContext context, String name, Block block, boolean wantarray) -
grapheme_clusters
-
each_grapheme_cluster
-
intern
rb_str_intern -
intern19
Deprecated. -
ord
-
sum
-
sum
-
sumCommon
-
to_c
string_to_c -
to_r
string_to_r -
unmarshalFrom
- Throws:
IOException
-
unpack
-
unpack1
-
unpack
Deprecated. -
empty
public void empty() -
encoding
-
encode_bang
-
encode_bang
-
encode_bang
public IRubyObject encode_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) -
encode_bang
-
encode
-
encode
-
encode
-
encode
public IRubyObject encode(ThreadContext context, IRubyObject toEncoding, IRubyObject forcedEncoding, IRubyObject opts) -
force_encoding
-
force_encoding
-
valid_encoding_p
-
ascii_only_p
-
b
-
scrub
-
scrub
-
scrub_bang
-
scrub_bang
-
freeze
Description copied from class:RubyBasicObjectrb_obj_freeze call-seq: obj.freeze => obj Prevents further modifications to obj. ATypeErrorwill be raised if modification is attempted. There is no way to unfreeze a frozen object. See alsoObject#frozen?. a = [ "a", "b", "c" ] a.freeze a << "z" produces: prog.rb:3:in `<<': can't modify frozen array (TypeError) from prog.rb:3- Overrides:
freezein classRubyBasicObject
-
setValue
Deprecated.Mutator for internal string representation.- Parameters:
value- The new java.lang.String this RubyString should encapsulate
-
setValue
-
getValue
-
getBytes
public byte[] getBytes() -
getByteList
- Specified by:
getByteListin interfaceByteListHolder
-
getUnicodeValue
used by ar-jdbc -
encodeBytelist
-
encodeBytelist
-
toJava
Description copied from interface:IRubyObjectConvert the object to the specified Java class, if possible.- Specified by:
toJavain interfaceIRubyObject- Overrides:
toJavain classRubyBasicObject- Parameters:
target- The target type to which the object should be converted.- See Also:
-
strScrub
Scrub the contents of this string, replacing invalid characters as appropriate. MRI: rb_str_scrub -
encStrScrub
public IRubyObject encStrScrub(ThreadContext context, org.jcodings.Encoding enc, IRubyObject repl, Block block) -
encStrScrub
public IRubyObject encStrScrub(ThreadContext context, org.jcodings.Encoding enc, IRubyObject repl, int cr, Block block) -
rbStrOffset
public int rbStrOffset(int pos) -
strOffset
private int strOffset(int nth, boolean singlebyte) -
includeRange
public static IRubyObject includeRange(ThreadContext context, RubyString _beg, RubyString _end, IRubyObject _val, boolean exclusive) -
isBare
Is this a "bare" string, i.e. not tainted, has no instance vars, and class == String. -
sites
-
strDup
Deprecated. -
modify19
Deprecated. -
split19
Deprecated. -
lines20
Deprecated. -
lines20
Deprecated. -
dump19
Deprecated. -
insert19
@Deprecated public IRubyObject insert19(ThreadContext context, IRubyObject indexArg, IRubyObject stringArg) Deprecated. -
op_equal19
Deprecated. -
op_aref19
Deprecated. -
op_aref19
Deprecated. -
op_aset19
Deprecated. -
op_aset19
@Deprecated public IRubyObject op_aset19(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) Deprecated. -
op_match19
Deprecated.- Overrides:
op_match19in classRubyBasicObject
-
scan19
Deprecated.
-