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