Package org.jruby.util
Class StringSupport
java.lang.Object
org.jruby.util.StringSupport
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic final classrb_str_tr / rb_str_tr_bangstatic final classtr_setup_table -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ByteListaddByteLists(ByteList value1, ByteList value2) static booleanareComparable(CodeRangeable string, CodeRangeable other) static booleanareComparableViaCodeRange(CodeRangeable string, CodeRangeable other) static org.jcodings.EncodingareCompatible(org.jcodings.Encoding enc1, CodeRangeable str2) static org.jcodings.EncodingareCompatible(ByteList str1, ByteList str2) static org.jcodings.EncodingareCompatible(CodeRangeable str1, CodeRangeable str2) rb_enc_compatiblestatic voidasciiOnlyCaseMap(Ruby runtime, ByteList value, org.jcodings.IntHolder flags, org.jcodings.Encoding enc) Deprecated.static voidasciiOnlyCaseMap(ThreadContext context, ByteList value, org.jcodings.IntHolder flags) static voidassociateEncoding(CodeRangeable string, org.jcodings.Encoding enc) static intbyteindex(CodeRangeable sourceString, CodeRangeable otherString, int offset, org.jcodings.Encoding enc) static StringbyteListAsString(ByteList bytes) static intbyterindex(ByteList source, int pos, CodeRangeable subStringCodeRangeable, org.jcodings.Encoding enc) static intbytesToFixBrokenTrailingCharacter(byte[] bytes, int begin, int byteSize, org.jcodings.Encoding encoding, int usingLength) static intbytesToFixBrokenTrailingCharacter(ByteList val, int usingLength) static intcaseCmp(byte[] bytes1, int p1, byte[] bytes2, int p2, int len) static ByteListDeprecated.static ByteListcaseMap(ThreadContext context, ByteList src, org.jcodings.IntHolder flags, org.jcodings.Encoding enc) static intcheckCaseMapOptions(Ruby runtime, IRubyObject arg0, int flags) Deprecated.static intcheckCaseMapOptions(Ruby runtime, IRubyObject arg0, IRubyObject arg1, int flags) Deprecated.static intcheckCaseMapOptions(ThreadContext context, IRubyObject arg0, int flags) static intcheckCaseMapOptions(ThreadContext context, IRubyObject arg0, IRubyObject arg1, int flags) static intcheckCodepointError(int i) static RubyStringcheckEmbeddedNulls(Ruby runtime, IRubyObject ptr) Deprecated.static voidcheckStringSafety(Ruby runtime, IRubyObject value) Check whether input object's string value contains a null byte, and if so throw ArgumentError.static voidcheckStringSafetyMBC(Ruby runtime, RubyString value) static intMRI: chopped_lengthstatic intcodeLength(org.jcodings.Encoding enc, int c) static intcodePoint(org.jcodings.Encoding enc, byte[] bytes, int p, int end) static intDeprecated.static intDeprecated.static intcodePoint(ThreadContext context, org.jcodings.Encoding enc, byte[] bytes, int p, int end) static intcodePoint(ThreadContext context, ByteList value) static StringcodeRangeAsString(int codeRange) static intcodeRangeScan(org.jcodings.Encoding enc, byte[] bytes, int p, int len) static intcodeRangeScan(org.jcodings.Encoding enc, ByteList bytes) static longcodeRangeScanRestartable(org.jcodings.Encoding enc, byte[] bytes, int s, int end, int cr) static CharSequenceconcat(CharSequence str1, CharSequence str2) static Stringstatic intCONSTRUCT_MBCLEN_CHARFOUND(int n) static booleancontentEquals(CharSequence str, int chr) static booleancontentEquals(CharSequence str, int chr1, int chr2) static Stringstatic ByteListdumpCommon(Ruby runtime, ByteList bytelist) rb_str_dumpstatic ByteListdumpCommon(Ruby runtime, ByteList byteList, boolean quoteOnlyIfNeeded) static intencCoderangeClean(int cr) static intencFastMBCLen(byte[] bytes, int p, int e, org.jcodings.Encoding enc) static StringescapedCharFormat(int c, boolean isUnicode) static longgetAscii(org.jcodings.Encoding enc, byte[] bytes, int p, int end) static longgetAscii(org.jcodings.Encoding enc, byte[] bytes, int p, int end, int len) static inthexLength(byte[] bytes, int p, int len) static inthexLength(byte[] bytes, int p, int len, org.jcodings.Encoding enc) static intstatic intindex(CodeRangeable sourceString, CodeRangeable otherString, int offset, org.jcodings.Encoding enc) static booleanisAsciiOnly(CodeRangeable string) static booleanisEVStr(byte[] bytes, int p, int end) static booleanisEVStr(int c) static booleanisIncompleteChar(int b) static booleanisSingleByteOptimizable(CodeRangeable string, org.jcodings.Encoding encoding) static booleanisUnicode(org.jcodings.Encoding enc) Deprecated.static intlastIndexOf(CharSequence str, char c, int index) static intlength(org.jcodings.Encoding enc, byte[] bytes, int p, int end) static intMBCLEN_CHARFOUND_LEN(int r) static booleanMBCLEN_CHARFOUND_P(int r) static booleanMBCLEN_INVALID_P(int r) static intMBCLEN_NEEDMORE(int n) static intMBCLEN_NEEDMORE_LEN(int r) static booleanMBCLEN_NEEDMORE_P(int r) static intmemchr(byte[] ptr, int start, int find, int len) Deprecated.static intmemmem(byte[] aBytes, int aStart, int aLen, byte[] p, int pStart, int pLen) static intmemsearch(byte[] xBytes, int x0, int m, byte[] yBytes, int y0, int n, org.jcodings.Encoding enc) static intmultiByteCasecmp(org.jcodings.Encoding enc, ByteList value, ByteList otherValue) static booleanmultiByteSqueeze(Ruby runtime, ByteList value, boolean[] squeeze, StringSupport.TrTables tables, org.jcodings.Encoding enc, boolean isArg) Deprecated.static booleanmultiByteSqueeze(ThreadContext context, ByteList value, boolean[] squeeze, StringSupport.TrTables tables, org.jcodings.Encoding enc, boolean isArg) static booleanmultiByteSqueeze(ByteList value, boolean[] squeeze, StringSupport.TrTables tables, org.jcodings.Encoding enc, boolean isArg) static intnth(org.jcodings.Encoding enc, byte[] bytes, int p, int end, int n) Return the byte offset of the nth characternin the given byte array betweenpandnusingencas the encoding.static intnth(org.jcodings.Encoding enc, byte[] bytes, int p, int end, int n, boolean singlebyte) Get the position of the nth character in the given byte array, using the given encoding and range.static intstatic intoctLength(byte[] bytes, int p, int len) static intoctLength(byte[] bytes, int p, int len, org.jcodings.Encoding enc) static intoffset(org.jcodings.Encoding enc, byte[] bytes, int p, int end, int n) static intoffset(org.jcodings.Encoding enc, byte[] bytes, int p, int end, int n, boolean singlebyte) static intoffset(RubyString str, int pos) static longpack(int result, int arg) static intpositionEndForScan(ByteList value, org.joni.Matcher matcher, org.jcodings.Encoding enc, int begin, int range) rb_str_scanstatic intpreciseCodePoint(org.jcodings.Encoding enc, byte[] bytes, int p, int end) static intpreciseLength(org.jcodings.Encoding enc, byte[] bytes, int p, int end) static IRubyObjectrbStrEnumerateLines(RubyString str, ThreadContext context, String name, IRubyObject arg, Block block, boolean wantarray) static IRubyObjectrbStrEnumerateLines(RubyString str, ThreadContext context, String name, IRubyObject arg, IRubyObject opts, Block block, boolean wantarray) static CharSequencereplaceAll(String str, String sub, String repl) static CharSequencereplaceFirst(String str, String sub, String repl) static ByteListreplaceInternal(int beg, int len, ByteListHolder source, CodeRangeable repl) static voidreplaceInternal19(int beg, int len, CodeRangeable source, CodeRangeable repl) Deprecated.static voidreplaceInternal19(Ruby runtime, int beg, int len, RubyString source, RubyString repl) Deprecated.static intrindex(ByteList source, int sourceChars, int subChars, int pos, CodeRangeable subStringCodeRangeable, org.jcodings.Encoding enc) static intscanHex(byte[] bytes, int p, int len) static intscanHex(byte[] bytes, int p, int len, org.jcodings.Encoding enc) static intscanOct(byte[] bytes, int p, int len) static intscanOct(byte[] bytes, int p, int len, org.jcodings.Encoding enc) static intsearchNonAscii(byte[] bytes, int p, int end) static intsearchNonAscii(String string) static intsearchNonAscii(ByteList bytes) static booleansingleByteSqueeze(ByteList value, boolean[] squeeze) Split string into sub-parts.Split string into (limited) sub-parts.static booleanstartsWith(CharSequence str, char c) static booleanstartsWith(CharSequence str, char c1, char c2) static booleanstartsWith(CharSequence str, String prefix) static intstrCount(ThreadContext context, ByteList str, boolean[] table, StringSupport.TrTables tables, org.jcodings.Encoding enc) static intstrCount(ByteList str, boolean[] table, StringSupport.TrTables tables, org.jcodings.Encoding enc) rb_str_countstatic intstrCount(ByteList str, Ruby runtime, boolean[] table, StringSupport.TrTables tables, org.jcodings.Encoding enc) Deprecated.static CodeRangeablestrDeleteBang(ThreadContext context, CodeRangeable rubyString, boolean[] squeeze, StringSupport.TrTables tables, org.jcodings.Encoding enc) static CodeRangeablestrDeleteBang(CodeRangeable rubyString, Ruby runtime, boolean[] squeeze, StringSupport.TrTables tables, org.jcodings.Encoding enc) Deprecated.static intstrLength(org.jcodings.Encoding enc, byte[] bytes, int p, int end) static intstrLength(org.jcodings.Encoding enc, byte[] bytes, int p, int e, int cr) static intstatic intstrLengthFromRubyString(CodeRangeable string) static intstrLengthFromRubyString(CodeRangeable string, org.jcodings.Encoding enc) static intstrLengthFromRubyString(CodeRangeable string, ByteList bytes, org.jcodings.Encoding enc) static longstrLengthWithCodeRange(org.jcodings.Encoding enc, byte[] bytes, int p, int end) static longstrLengthWithCodeRange(ByteList bytes) static longstrLengthWithCodeRange(ByteList bytes, org.jcodings.Encoding enc) static longstrLengthWithCodeRangeAsciiCompatible(org.jcodings.Encoding enc, byte[] bytes, int p, int end) static longstrLengthWithCodeRangeNonAsciiCompatible(org.jcodings.Encoding enc, byte[] bytes, int p, int end) static Object[]strNullCheck(IRubyObject ptr) static voidstrUpdate(int beg, int len, CodeRangeable source, CodeRangeable repl) static voidstrUpdate(Ruby runtime, int beg, int len, RubyString source, RubyString repl) Deprecated.static voidstrUpdate(ThreadContext context, int beg, int len, RubyString source, RubyString repl) static StringSupport.NeighborCharsuccChar(org.jcodings.Encoding enc, byte[] bytes, int p, int len) static StringSupport.NeighborCharstatic ByteListsuccCommon(Ruby runtime, ByteList original) Deprecated.static ByteListsuccCommon(ThreadContext context, ByteList original) static ByteListsuccCommon(ByteList original) static inttoLower(org.jcodings.Encoding enc, int c) Deprecated.static inttoUpper(org.jcodings.Encoding enc, int c) Deprecated.static booleantrFind(int c, boolean[] table, StringSupport.TrTables tables) static inttrNext(StringSupport.TR tr, org.jcodings.Encoding enc) static inttrNext(StringSupport.TR tr, Ruby runtime, org.jcodings.Encoding enc) static StringSupport.TrTablestrSetupTable(ThreadContext context, ByteList str, boolean[] stable, StringSupport.TrTables tables, boolean first, org.jcodings.Encoding enc) static StringSupport.TrTablestrSetupTable(ByteList str, boolean[] stable, StringSupport.TrTables tables, boolean first, org.jcodings.Encoding enc) static StringSupport.TrTablestrSetupTable(ByteList str, Ruby runtime, boolean[] stable, StringSupport.TrTables tables, boolean first, org.jcodings.Encoding enc) Deprecated.static CodeRangeabletrTransHelper(Ruby runtime, CodeRangeable self, CodeRangeable srcStr, CodeRangeable replStr, boolean sflag) Deprecated.static CodeRangeabletrTransHelper(CodeRangeable self, CodeRangeable srcStr, CodeRangeable replStr, boolean sflag) rb_str_tr / rb_str_tr_bangstatic intunpackArg(long cr) static intunpackResult(long len) static intutf8Length(byte[] bytes, int p, int end) static intutf8Length(ByteList bytes) static intutf8Nth(byte[] bytes, int p, int e, int nth) static intutf8Offset(byte[] bytes, int p, int end, int n)
-
Field Details
-
CR_7BIT_F
public static final int CR_7BIT_F -
CR_VALID_F
public static final int CR_VALID_F -
CR_UNKNOWN
public static final int CR_UNKNOWN- See Also:
-
CR_7BIT
public static final int CR_7BIT- See Also:
-
CR_VALID
public static final int CR_VALID- See Also:
-
CR_BROKEN
public static final int CR_BROKEN- See Also:
-
CR_MASK
public static final int CR_MASK- See Also:
-
TRANS_SIZE
public static final int TRANS_SIZE- See Also:
-
EMPTY_BYTELIST_ARRAY
-
EMPTY_STRING_ARRAY
-
-
Constructor Details
-
StringSupport
public StringSupport()
-
-
Method Details
-
split
Split string into sub-parts.- Parameters:
str- the stringsep- the separator- See Also:
-
split
Split string into (limited) sub-parts.- Parameters:
str- the stringsep- the separatorlim- has same effect as withString.split(String, int)
-
startsWith
-
startsWith
-
startsWith
-
lastIndexOf
-
contentEquals
-
contentEquals
-
concat
-
concat
-
delete
-
replaceFirst
-
replaceAll
-
codeRangeAsString
-
encFastMBCLen
public static int encFastMBCLen(byte[] bytes, int p, int e, org.jcodings.Encoding enc) -
length
public static int length(org.jcodings.Encoding enc, byte[] bytes, int p, int end) -
preciseLength
public static int preciseLength(org.jcodings.Encoding enc, byte[] bytes, int p, int end) -
MBCLEN_NEEDMORE_P
public static boolean MBCLEN_NEEDMORE_P(int r) -
MBCLEN_NEEDMORE
public static int MBCLEN_NEEDMORE(int n) -
MBCLEN_NEEDMORE_LEN
public static int MBCLEN_NEEDMORE_LEN(int r) -
MBCLEN_INVALID_P
public static boolean MBCLEN_INVALID_P(int r) -
MBCLEN_CHARFOUND_LEN
public static int MBCLEN_CHARFOUND_LEN(int r) -
MBCLEN_CHARFOUND_P
public static boolean MBCLEN_CHARFOUND_P(int r) -
CONSTRUCT_MBCLEN_CHARFOUND
public static int CONSTRUCT_MBCLEN_CHARFOUND(int n) -
searchNonAscii
public static int searchNonAscii(byte[] bytes, int p, int end) -
searchNonAscii
-
searchNonAscii
-
codeRangeScan
public static int codeRangeScan(org.jcodings.Encoding enc, byte[] bytes, int p, int len) -
codeRangeScan
-
codeRangeScanRestartable
public static long codeRangeScanRestartable(org.jcodings.Encoding enc, byte[] bytes, int s, int end, int cr) -
utf8Length
public static int utf8Length(byte[] bytes, int p, int end) -
utf8Length
-
strLength
public static int strLength(org.jcodings.Encoding enc, byte[] bytes, int p, int end) -
strLength
public static int strLength(org.jcodings.Encoding enc, byte[] bytes, int p, int e, int cr) -
strLength
-
strLengthWithCodeRange
public static long strLengthWithCodeRange(org.jcodings.Encoding enc, byte[] bytes, int p, int end) -
strLengthWithCodeRangeAsciiCompatible
public static long strLengthWithCodeRangeAsciiCompatible(org.jcodings.Encoding enc, byte[] bytes, int p, int end) -
strLengthWithCodeRangeNonAsciiCompatible
public static long strLengthWithCodeRangeNonAsciiCompatible(org.jcodings.Encoding enc, byte[] bytes, int p, int end) -
strLengthWithCodeRange
-
strLengthWithCodeRange
-
pack
public static long pack(int result, int arg) -
unpackResult
public static int unpackResult(long len) -
unpackArg
public static int unpackArg(long cr) -
codePoint
public static int codePoint(org.jcodings.Encoding enc, byte[] bytes, int p, int end) -
codePoint
@Deprecated(since="10.0") public static int codePoint(Ruby runtime, org.jcodings.Encoding enc, byte[] bytes, int p, int end) Deprecated. -
codePoint
public static int codePoint(ThreadContext context, org.jcodings.Encoding enc, byte[] bytes, int p, int end) -
codePoint
Deprecated. -
codePoint
-
codeLength
public static int codeLength(org.jcodings.Encoding enc, int c) -
checkCodepointError
public static int checkCodepointError(int i) -
getAscii
public static long getAscii(org.jcodings.Encoding enc, byte[] bytes, int p, int end) -
getAscii
public static long getAscii(org.jcodings.Encoding enc, byte[] bytes, int p, int end, int len) -
preciseCodePoint
public static int preciseCodePoint(org.jcodings.Encoding enc, byte[] bytes, int p, int end) -
utf8Nth
public static int utf8Nth(byte[] bytes, int p, int e, int nth) -
nth
public static int nth(org.jcodings.Encoding enc, byte[] bytes, int p, int end, int n) Return the byte offset of the nth characternin the given byte array betweenpandnusingencas the encoding. Note that the resulting offset will absolute, and therefore >=p. Subtractpto get a relative offset.- Parameters:
enc- the encoding of the characters in the byte arraybytes- the byte arrayp- starting offsetend- limit offsetn- character offset to find- Returns:
- the byte offset of the requested character, or -1 if the requested character offset is outside the given byte offset range
-
nth
-
nth
public static int nth(org.jcodings.Encoding enc, byte[] bytes, int p, int end, int n, boolean singlebyte) Get the position of the nth character in the given byte array, using the given encoding and range.- Parameters:
enc- encoding to usebytes- bytes to scanp- starting byte offsetend- ending byte offsetn- index of character for which to find byte offsetsinglebyte- whether the byte contents are in a single byte encoding- Returns:
- the offset of the nth character in the string, or -1 if nth is out of the string
-
utf8Offset
public static int utf8Offset(byte[] bytes, int p, int end, int n) -
offset
public static int offset(org.jcodings.Encoding enc, byte[] bytes, int p, int end, int n) -
offset
public static int offset(org.jcodings.Encoding enc, byte[] bytes, int p, int end, int n, boolean singlebyte) -
offset
-
toLower
Deprecated. -
toUpper
Deprecated. -
caseCmp
public static int caseCmp(byte[] bytes1, int p1, byte[] bytes2, int p2, int len) -
scanHex
public static int scanHex(byte[] bytes, int p, int len) -
scanHex
public static int scanHex(byte[] bytes, int p, int len, org.jcodings.Encoding enc) -
hexLength
public static int hexLength(byte[] bytes, int p, int len) -
hexLength
public static int hexLength(byte[] bytes, int p, int len, org.jcodings.Encoding enc) -
scanOct
public static int scanOct(byte[] bytes, int p, int len) -
scanOct
public static int scanOct(byte[] bytes, int p, int len, org.jcodings.Encoding enc) -
octLength
public static int octLength(byte[] bytes, int p, int len) -
octLength
public static int octLength(byte[] bytes, int p, int len, org.jcodings.Encoding enc) -
checkStringSafety
Check whether input object's string value contains a null byte, and if so throw ArgumentError.- Parameters:
runtime-value-
-
checkStringSafetyMBC
-
escapedCharFormat
-
isIncompleteChar
public static boolean isIncompleteChar(int b) -
bytesToFixBrokenTrailingCharacter
-
bytesToFixBrokenTrailingCharacter
public static int bytesToFixBrokenTrailingCharacter(byte[] bytes, int begin, int byteSize, org.jcodings.Encoding encoding, int usingLength) -
memchr
Deprecated. -
checkEmbeddedNulls
@Deprecated(since="10.0") public static RubyString checkEmbeddedNulls(Ruby runtime, IRubyObject ptr) Deprecated. -
strNullCheck
-
positionEndForScan
public static int positionEndForScan(ByteList value, org.joni.Matcher matcher, org.jcodings.Encoding enc, int begin, int range) rb_str_scan -
dumpCommon
rb_str_dump -
dumpCommon
-
isEVStr
public static boolean isEVStr(byte[] bytes, int p, int end) -
isEVStr
public static boolean isEVStr(int c) -
strCount
public static int strCount(ByteList str, boolean[] table, StringSupport.TrTables tables, org.jcodings.Encoding enc) rb_str_count -
strCount
@Deprecated(since="10.0") public static int strCount(ByteList str, Ruby runtime, boolean[] table, StringSupport.TrTables tables, org.jcodings.Encoding enc) Deprecated. -
strCount
public static int strCount(ThreadContext context, ByteList str, boolean[] table, StringSupport.TrTables tables, org.jcodings.Encoding enc) -
rindex
public static int rindex(ByteList source, int sourceChars, int subChars, int pos, CodeRangeable subStringCodeRangeable, org.jcodings.Encoding enc) -
byterindex
public static int byterindex(ByteList source, int pos, CodeRangeable subStringCodeRangeable, org.jcodings.Encoding enc) -
strLengthFromRubyString
-
strLengthFromRubyString
-
strLengthFromRubyString
public static int strLengthFromRubyString(CodeRangeable string, ByteList bytes, org.jcodings.Encoding enc) -
trSetupTable
public static StringSupport.TrTables trSetupTable(ByteList str, boolean[] stable, StringSupport.TrTables tables, boolean first, org.jcodings.Encoding enc) -
trSetupTable
@Deprecated(since="10.0") public static StringSupport.TrTables trSetupTable(ByteList str, Ruby runtime, boolean[] stable, StringSupport.TrTables tables, boolean first, org.jcodings.Encoding enc) Deprecated. -
trSetupTable
public static StringSupport.TrTables trSetupTable(ThreadContext context, ByteList str, boolean[] stable, StringSupport.TrTables tables, boolean first, org.jcodings.Encoding enc) -
trFind
-
trNext
-
trNext
-
succCommon
-
succCommon
Deprecated. -
succCommon
-
succChar
public static StringSupport.NeighborChar succChar(org.jcodings.Encoding enc, byte[] bytes, int p, int len) -
succChar
public static StringSupport.NeighborChar succChar(Ruby runtime, org.jcodings.Encoding enc, byte[] bytes, int p, int len) -
isSingleByteOptimizable
-
index
- Parameters:
source- string to find index withinother- string to match in sourceoffset- in bytes to start lookingenc- encoding to use to walk the source string.- Returns:
-
byteindex
public static int byteindex(CodeRangeable sourceString, CodeRangeable otherString, int offset, org.jcodings.Encoding enc) -
index
public static int index(CodeRangeable sourceString, CodeRangeable otherString, int offset, org.jcodings.Encoding enc) -
associateEncoding
-
replaceInternal
-
replaceInternal19
@Deprecated(since="9.4") public static void replaceInternal19(int beg, int len, CodeRangeable source, CodeRangeable repl) Deprecated. -
replaceInternal19
@Deprecated(since="9.4") public static void replaceInternal19(Ruby runtime, int beg, int len, RubyString source, RubyString repl) Deprecated. -
strUpdate
-
strUpdate
@Deprecated(since="10.0") public static void strUpdate(Ruby runtime, int beg, int len, RubyString source, RubyString repl) Deprecated. -
strUpdate
public static void strUpdate(ThreadContext context, int beg, int len, RubyString source, RubyString repl) -
isAsciiOnly
-
strDeleteBang
@Deprecated(since="10.0") public static CodeRangeable strDeleteBang(CodeRangeable rubyString, Ruby runtime, boolean[] squeeze, StringSupport.TrTables tables, org.jcodings.Encoding enc) Deprecated. -
strDeleteBang
public static CodeRangeable strDeleteBang(ThreadContext context, CodeRangeable rubyString, boolean[] squeeze, StringSupport.TrTables tables, org.jcodings.Encoding enc) -
choppedLength
MRI: chopped_length -
areCompatible
rb_enc_compatible -
areCompatible
-
areCompatible
-
addByteLists
-
areComparable
-
areComparableViaCodeRange
-
rbStrEnumerateLines
public static IRubyObject rbStrEnumerateLines(RubyString str, ThreadContext context, String name, IRubyObject arg, Block block, boolean wantarray) -
rbStrEnumerateLines
public static IRubyObject rbStrEnumerateLines(RubyString str, ThreadContext context, String name, IRubyObject arg, IRubyObject opts, Block block, boolean wantarray) -
memsearch
public static int memsearch(byte[] xBytes, int x0, int m, byte[] yBytes, int y0, int n, org.jcodings.Encoding enc) -
trTransHelper
public static CodeRangeable trTransHelper(CodeRangeable self, CodeRangeable srcStr, CodeRangeable replStr, boolean sflag) rb_str_tr / rb_str_tr_bang -
trTransHelper
@Deprecated(since="10.0") public static CodeRangeable trTransHelper(Ruby runtime, CodeRangeable self, CodeRangeable srcStr, CodeRangeable replStr, boolean sflag) Deprecated. -
multiByteCasecmp
-
singleByteSqueeze
-
multiByteSqueeze
public static boolean multiByteSqueeze(ByteList value, boolean[] squeeze, StringSupport.TrTables tables, org.jcodings.Encoding enc, boolean isArg) -
multiByteSqueeze
@Deprecated(since="10.0") public static boolean multiByteSqueeze(Ruby runtime, ByteList value, boolean[] squeeze, StringSupport.TrTables tables, org.jcodings.Encoding enc, boolean isArg) Deprecated. -
multiByteSqueeze
public static boolean multiByteSqueeze(ThreadContext context, ByteList value, boolean[] squeeze, StringSupport.TrTables tables, org.jcodings.Encoding enc, boolean isArg) -
memmem
public static int memmem(byte[] aBytes, int aStart, int aLen, byte[] p, int pStart, int pLen) -
checkCaseMapOptions
@Deprecated(since="10.0") public static int checkCaseMapOptions(Ruby runtime, IRubyObject arg0, IRubyObject arg1, int flags) Deprecated. -
checkCaseMapOptions
public static int checkCaseMapOptions(ThreadContext context, IRubyObject arg0, IRubyObject arg1, int flags) -
checkCaseMapOptions
@Deprecated(since="10.0") public static int checkCaseMapOptions(Ruby runtime, IRubyObject arg0, int flags) Deprecated. -
checkCaseMapOptions
-
caseMap
@Deprecated(since="10.0") public static ByteList caseMap(Ruby runtime, ByteList src, org.jcodings.IntHolder flags, org.jcodings.Encoding enc) Deprecated. -
caseMap
public static ByteList caseMap(ThreadContext context, ByteList src, org.jcodings.IntHolder flags, org.jcodings.Encoding enc) -
asciiOnlyCaseMap
@Deprecated(since="10.0") public static void asciiOnlyCaseMap(Ruby runtime, ByteList value, org.jcodings.IntHolder flags, org.jcodings.Encoding enc) Deprecated. -
asciiOnlyCaseMap
public static void asciiOnlyCaseMap(ThreadContext context, ByteList value, org.jcodings.IntHolder flags) -
encCoderangeClean
public static int encCoderangeClean(int cr) -
byteListAsString
-
isUnicode
Deprecated.
-