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 <T> T |
split(ByteList value,
ByteList pattern,
ByteListHelper.Visit<ByteList,T> bodyVisitor,
ByteListHelper.Visit<ByteList,T> headVisitor)
This method will split a string and call a visitor for each segment between the split pattern.
|
public static boolean eachCodePoint(ByteList bytelist, ByteListHelper.CodePoint each)
bytelist - of the mbc-laden byteseach - 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-2020 JRuby. All Rights Reserved.