Package org.jruby.util
Class StringSupport
java.lang.Object
org.jruby.util.StringSupport
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static final class
rb_str_tr / rb_str_tr_bangstatic final class
tr_setup_table -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ByteList
addByteLists
(ByteList value1, ByteList value2) static boolean
areComparable
(CodeRangeable string, CodeRangeable other) static boolean
areComparableViaCodeRange
(CodeRangeable string, CodeRangeable other) static org.jcodings.Encoding
areCompatible
(org.jcodings.Encoding enc1, CodeRangeable str2) static org.jcodings.Encoding
areCompatible
(ByteList str1, ByteList str2) static org.jcodings.Encoding
areCompatible
(CodeRangeable str1, CodeRangeable str2) rb_enc_compatiblestatic void
asciiOnlyCaseMap
(Ruby runtime, ByteList value, org.jcodings.IntHolder flags, org.jcodings.Encoding enc) Deprecated.static void
asciiOnlyCaseMap
(ThreadContext context, ByteList value, org.jcodings.IntHolder flags) static void
associateEncoding
(CodeRangeable string, org.jcodings.Encoding enc) static int
byteindex
(CodeRangeable sourceString, CodeRangeable otherString, int offset, org.jcodings.Encoding enc) static String
byteListAsString
(ByteList bytes) static int
byterindex
(ByteList source, int pos, CodeRangeable subStringCodeRangeable, org.jcodings.Encoding enc) static int
bytesToFixBrokenTrailingCharacter
(byte[] bytes, int begin, int byteSize, org.jcodings.Encoding encoding, int usingLength) static int
bytesToFixBrokenTrailingCharacter
(ByteList val, int usingLength) static int
caseCmp
(byte[] bytes1, int p1, byte[] bytes2, int p2, int len) static ByteList
Deprecated.static ByteList
caseMap
(ThreadContext context, ByteList src, org.jcodings.IntHolder flags, org.jcodings.Encoding enc) static int
checkCaseMapOptions
(Ruby runtime, IRubyObject arg0, int flags) Deprecated.static int
checkCaseMapOptions
(Ruby runtime, IRubyObject arg0, IRubyObject arg1, int flags) Deprecated.static int
checkCaseMapOptions
(ThreadContext context, IRubyObject arg0, int flags) static int
checkCaseMapOptions
(ThreadContext context, IRubyObject arg0, IRubyObject arg1, int flags) static int
checkCodepointError
(int i) static RubyString
checkEmbeddedNulls
(Ruby runtime, IRubyObject ptr) Deprecated.static void
checkStringSafety
(Ruby runtime, IRubyObject value) Check whether input object's string value contains a null byte, and if so throw ArgumentError.static void
checkStringSafetyMBC
(Ruby runtime, RubyString value) static int
MRI: chopped_lengthstatic int
codeLength
(org.jcodings.Encoding enc, int c) static int
codePoint
(org.jcodings.Encoding enc, byte[] bytes, int p, int end) static int
Deprecated.static int
Deprecated.static int
codePoint
(ThreadContext context, org.jcodings.Encoding enc, byte[] bytes, int p, int end) static int
codePoint
(ThreadContext context, ByteList value) static String
codeRangeAsString
(int codeRange) static int
codeRangeScan
(org.jcodings.Encoding enc, byte[] bytes, int p, int len) static int
codeRangeScan
(org.jcodings.Encoding enc, ByteList bytes) static long
codeRangeScanRestartable
(org.jcodings.Encoding enc, byte[] bytes, int s, int end, int cr) static CharSequence
concat
(CharSequence str1, CharSequence str2) static String
static int
CONSTRUCT_MBCLEN_CHARFOUND
(int n) static boolean
contentEquals
(CharSequence str, int chr) static boolean
contentEquals
(CharSequence str, int chr1, int chr2) static String
static ByteList
dumpCommon
(Ruby runtime, ByteList bytelist) rb_str_dumpstatic ByteList
dumpCommon
(Ruby runtime, ByteList byteList, boolean quoteOnlyIfNeeded) static int
encCoderangeClean
(int cr) static int
encFastMBCLen
(byte[] bytes, int p, int e, org.jcodings.Encoding enc) static String
escapedCharFormat
(int c, boolean isUnicode) static long
getAscii
(org.jcodings.Encoding enc, byte[] bytes, int p, int end) static long
getAscii
(org.jcodings.Encoding enc, byte[] bytes, int p, int end, int len) static int
hexLength
(byte[] bytes, int p, int len) static int
hexLength
(byte[] bytes, int p, int len, org.jcodings.Encoding enc) static int
static int
index
(CodeRangeable sourceString, CodeRangeable otherString, int offset, org.jcodings.Encoding enc) static boolean
isAsciiOnly
(CodeRangeable string) static boolean
isEVStr
(byte[] bytes, int p, int end) static boolean
isEVStr
(int c) static boolean
isIncompleteChar
(int b) static boolean
isSingleByteOptimizable
(CodeRangeable string, org.jcodings.Encoding encoding) static boolean
isUnicode
(org.jcodings.Encoding enc) Deprecated.static int
lastIndexOf
(CharSequence str, char c, int index) static int
length
(org.jcodings.Encoding enc, byte[] bytes, int p, int end) static int
MBCLEN_CHARFOUND_LEN
(int r) static boolean
MBCLEN_CHARFOUND_P
(int r) static boolean
MBCLEN_INVALID_P
(int r) static int
MBCLEN_NEEDMORE
(int n) static int
MBCLEN_NEEDMORE_LEN
(int r) static boolean
MBCLEN_NEEDMORE_P
(int r) static int
memchr
(byte[] ptr, int start, int find, int len) Deprecated.static int
memmem
(byte[] aBytes, int aStart, int aLen, byte[] p, int pStart, int pLen) static int
memsearch
(byte[] xBytes, int x0, int m, byte[] yBytes, int y0, int n, org.jcodings.Encoding enc) static int
multiByteCasecmp
(org.jcodings.Encoding enc, ByteList value, ByteList otherValue) static boolean
multiByteSqueeze
(Ruby runtime, ByteList value, boolean[] squeeze, StringSupport.TrTables tables, org.jcodings.Encoding enc, boolean isArg) Deprecated.static boolean
multiByteSqueeze
(ThreadContext context, ByteList value, boolean[] squeeze, StringSupport.TrTables tables, org.jcodings.Encoding enc, boolean isArg) static boolean
multiByteSqueeze
(ByteList value, boolean[] squeeze, StringSupport.TrTables tables, org.jcodings.Encoding enc, boolean isArg) static int
nth
(org.jcodings.Encoding enc, byte[] bytes, int p, int end, int n) Return the byte offset of the nth charactern
in the given byte array betweenp
andn
usingenc
as the encoding.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.static int
static int
octLength
(byte[] bytes, int p, int len) static int
octLength
(byte[] bytes, int p, int len, org.jcodings.Encoding enc) static int
offset
(org.jcodings.Encoding enc, byte[] bytes, int p, int end, int n) static int
offset
(org.jcodings.Encoding enc, byte[] bytes, int p, int end, int n, boolean singlebyte) static int
offset
(RubyString str, int pos) static long
pack
(int result, int arg) static int
positionEndForScan
(ByteList value, org.joni.Matcher matcher, org.jcodings.Encoding enc, int begin, int range) rb_str_scanstatic int
preciseCodePoint
(org.jcodings.Encoding enc, byte[] bytes, int p, int end) static int
preciseLength
(org.jcodings.Encoding enc, byte[] bytes, int p, int end) static IRubyObject
rbStrEnumerateLines
(RubyString str, ThreadContext context, String name, IRubyObject arg, Block block, boolean wantarray) static IRubyObject
rbStrEnumerateLines
(RubyString str, ThreadContext context, String name, IRubyObject arg, IRubyObject opts, Block block, boolean wantarray) static CharSequence
replaceAll
(String str, String sub, String repl) static CharSequence
replaceFirst
(String str, String sub, String repl) static ByteList
replaceInternal
(int beg, int len, ByteListHolder source, CodeRangeable repl) static void
replaceInternal19
(int beg, int len, CodeRangeable source, CodeRangeable repl) Deprecated.static void
replaceInternal19
(Ruby runtime, int beg, int len, RubyString source, RubyString repl) Deprecated.static int
rindex
(ByteList source, int sourceChars, int subChars, int pos, CodeRangeable subStringCodeRangeable, org.jcodings.Encoding enc) static int
scanHex
(byte[] bytes, int p, int len) static int
scanHex
(byte[] bytes, int p, int len, org.jcodings.Encoding enc) static int
scanOct
(byte[] bytes, int p, int len) static int
scanOct
(byte[] bytes, int p, int len, org.jcodings.Encoding enc) static int
searchNonAscii
(byte[] bytes, int p, int end) static int
searchNonAscii
(String string) static int
searchNonAscii
(ByteList bytes) static boolean
singleByteSqueeze
(ByteList value, boolean[] squeeze) Split string into sub-parts.Split string into (limited) sub-parts.static boolean
startsWith
(CharSequence str, char c) static boolean
startsWith
(CharSequence str, char c1, char c2) static boolean
startsWith
(CharSequence str, String prefix) static int
strCount
(ThreadContext context, ByteList str, boolean[] table, StringSupport.TrTables tables, org.jcodings.Encoding enc) static int
strCount
(ByteList str, boolean[] table, StringSupport.TrTables tables, org.jcodings.Encoding enc) rb_str_countstatic int
strCount
(ByteList str, Ruby runtime, boolean[] table, StringSupport.TrTables tables, org.jcodings.Encoding enc) Deprecated.static CodeRangeable
strDeleteBang
(ThreadContext context, CodeRangeable rubyString, boolean[] squeeze, StringSupport.TrTables tables, org.jcodings.Encoding enc) static CodeRangeable
strDeleteBang
(CodeRangeable rubyString, Ruby runtime, boolean[] squeeze, StringSupport.TrTables tables, org.jcodings.Encoding enc) Deprecated.static int
strLength
(org.jcodings.Encoding enc, byte[] bytes, int p, int end) static int
strLength
(org.jcodings.Encoding enc, byte[] bytes, int p, int e, int cr) static int
static int
strLengthFromRubyString
(CodeRangeable string) static int
strLengthFromRubyString
(CodeRangeable string, org.jcodings.Encoding enc) static int
strLengthFromRubyString
(CodeRangeable string, ByteList bytes, org.jcodings.Encoding enc) static long
strLengthWithCodeRange
(org.jcodings.Encoding enc, byte[] bytes, int p, int end) static long
strLengthWithCodeRange
(ByteList bytes) static long
strLengthWithCodeRange
(ByteList bytes, org.jcodings.Encoding enc) static long
strLengthWithCodeRangeAsciiCompatible
(org.jcodings.Encoding enc, byte[] bytes, int p, int end) static long
strLengthWithCodeRangeNonAsciiCompatible
(org.jcodings.Encoding enc, byte[] bytes, int p, int end) static Object[]
strNullCheck
(IRubyObject ptr) static void
strUpdate
(int beg, int len, CodeRangeable source, CodeRangeable repl) static void
strUpdate
(Ruby runtime, int beg, int len, RubyString source, RubyString repl) Deprecated.static void
strUpdate
(ThreadContext context, int beg, int len, RubyString source, RubyString repl) static StringSupport.NeighborChar
succChar
(org.jcodings.Encoding enc, byte[] bytes, int p, int len) static StringSupport.NeighborChar
static ByteList
succCommon
(Ruby runtime, ByteList original) Deprecated.static ByteList
succCommon
(ThreadContext context, ByteList original) static ByteList
succCommon
(ByteList original) static int
toLower
(org.jcodings.Encoding enc, int c) Deprecated.static int
toUpper
(org.jcodings.Encoding enc, int c) Deprecated.static boolean
trFind
(int c, boolean[] table, StringSupport.TrTables tables) static int
trNext
(StringSupport.TR tr, org.jcodings.Encoding enc) static int
trNext
(StringSupport.TR tr, Ruby runtime, org.jcodings.Encoding enc) static StringSupport.TrTables
trSetupTable
(ThreadContext context, ByteList str, boolean[] stable, StringSupport.TrTables tables, boolean first, org.jcodings.Encoding enc) static StringSupport.TrTables
trSetupTable
(ByteList str, boolean[] stable, StringSupport.TrTables tables, boolean first, org.jcodings.Encoding enc) static StringSupport.TrTables
trSetupTable
(ByteList str, Ruby runtime, boolean[] stable, StringSupport.TrTables tables, boolean first, org.jcodings.Encoding enc) Deprecated.static CodeRangeable
trTransHelper
(Ruby runtime, CodeRangeable self, CodeRangeable srcStr, CodeRangeable replStr, boolean sflag) Deprecated.static CodeRangeable
trTransHelper
(CodeRangeable self, CodeRangeable srcStr, CodeRangeable replStr, boolean sflag) rb_str_tr / rb_str_tr_bangstatic int
unpackArg
(long cr) static int
unpackResult
(long len) static int
utf8Length
(byte[] bytes, int p, int end) static int
utf8Length
(ByteList bytes) static int
utf8Nth
(byte[] bytes, int p, int e, int nth) static int
utf8Offset
(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 charactern
in the given byte array betweenp
andn
usingenc
as the encoding. Note that the resulting offset will absolute, and therefore >=p
. Subtractp
to 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.
-