Util

object Util
class Object
trait Matchable
class Any

Type members

Classlikes

class ConcatIterator[T](it0: Iterator[Iterator[T]], joiner: () => Iterator[T]) extends Iterator[T]

Basically a fast, efficient .flatten or mkString for nested iterators

Basically a fast, efficient .flatten or mkString for nested iterators

For some reason, the default way of concatenation e.g.

val middle = first ++ lastChildIter ++ sep ++ remaining

Was throwing weird NullPointerExceptions I couldn't figure out =(

Also, ++ didn't seem to be sufficiently lazy, so it was forcing things earlier than it really needed to. It isn't documented anywhere how lazy it's meant to be, whereas ConcatIterator here is obviously lazy and won't even evaluate each iterator until you ask it to

Value members

Concrete methods

def concat[T](is: () => Iterator[T]*): ConcatIterator[T]
def escapeChar(c: Char, sb: StringBuilder, unicode: Boolean): StringBuilder
def isOperator(ident: String): Boolean
def literalize(s: IndexedSeq[Char], unicode: Boolean): String

Convert a string to a C&P-able literal. Basically copied verbatim from the uPickle source code.

Convert a string to a C&P-able literal. Basically copied verbatim from the uPickle source code.