Interpret the string as the decimal representation of a natural number.
Panics if the string is not a string of digits.
Instances For
theorem
String.Iterator.sizeOf_next_lt_of_hasNext
(i : String.Iterator)
(h : String.Iterator.hasNext i = true)
:
sizeOf (String.Iterator.next i) < sizeOf i
theorem
String.Iterator.sizeOf_next_lt_of_atEnd
(i : String.Iterator)
(h : ¬String.Iterator.atEnd i = true)
:
sizeOf (String.Iterator.next i) < sizeOf i
@[specialize #[]]
Advance the given iterator until the predicate returns true or the end of the string is reached.
Equations
- String.Iterator.find it p = if String.Iterator.atEnd it = true then it else if p (String.Iterator.curr it) = true then it else String.Iterator.find (String.Iterator.next it) p
Instances For
@[specialize #[]]
def
String.Iterator.foldUntil
{α : Type u_1}
(it : String.Iterator)
(init : α)
(f : α → Char → Option α)
:
Equations
- One or more equations did not get rendered due to their size.