eat

fun eat(ch: String): String?

Consume and return the next character if it equals ch.


fun eat(pattern: Regex): String?

Consume and return the next character if it matches pattern.


fun eat(predicate: (String) -> Boolean): String?

Consume and return the next character if predicate returns true.