public class ByteListHelper
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ByteListHelper.CodePoint |
static interface |
ByteListHelper.Visit<T,U> |
| Constructor and Description |
|---|
ByteListHelper() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
eachCodePoint(ByteList bytelist,
ByteListHelper.CodePoint each)
This method assumes the ByteList will be a valid string for the encoding which it is marked as.
|
static int |
eachCodePointWhile(Ruby runtime,
ByteList bytelist,
int offset,
ByteListHelper.CodePoint each)
If you know you have an ASCII ByteList you should do something else.
|
static <T> T |
split(ByteList value,
ByteList pattern,
ByteListHelper.Visit<ByteList,T> bodyVisitor,
ByteListHelper.Visit<ByteList,T> headVisitor)
Deprecated.
This was only used by Module#const_defined, but was difficult to match MRI's equivalent in this form
|
public static boolean eachCodePoint(ByteList bytelist, ByteListHelper.CodePoint each)
bytelist - of the mbc-laden byteseach - the closure which walks the codepointspublic static int eachCodePointWhile(Ruby runtime, ByteList bytelist, int offset, ByteListHelper.CodePoint each)
bytelist - of the mbc-laden bytesoffset - place in bytes to search past begineach - the closure which walks the codepointspublic static <T> T split(ByteList value, ByteList pattern, ByteListHelper.Visit<ByteList,T> bodyVisitor, ByteListHelper.Visit<ByteList,T> headVisitor)
T - Return type of visitorvalue - to be splitpattern - the pattern to split value withbodyVisitor - visitor for all but last segmentheadVisitor - visitor for the last segment (if null if will use bodyVisitor).Copyright © 2001-2022 JRuby. All Rights Reserved.