@[instance]
Equations
- s₁.has_decidable_lt s₂ = s₁.data.has_decidable_lt s₂.data
@[instance]
Equations
- string.has_decidable_eq = λ (_x : string), string.has_decidable_eq._match_3 _x
- string.has_decidable_eq._match_3 {data := x} = λ (_x : string), string.has_decidable_eq._match_2 x _x
- string.has_decidable_eq._match_2 x {data := y} = string.has_decidable_eq._match_1 x y (list.has_dec_eq x y)
- string.has_decidable_eq._match_1 x y (decidable.is_true p) = decidable.is_true _
- string.has_decidable_eq._match_1 x y (decidable.is_false p) = decidable.is_false _
Equations
- string.fold a f s = list.foldl f a s.to_list
Equations
- string.iterator.curr {fst := p, snd := c :: n} = c
- string.iterator.curr {fst := fst, snd := list.nil char} = inhabited.default char
Equations
- string.iterator.extract_core (c :: cs₁) cs₂ = ite (cs₁ = cs₂) (option.some [c]) (string.iterator.extract_core._match_1 c (string.iterator.extract_core cs₁ cs₂))
- string.iterator.extract_core list.nil cs = option.none
- string.iterator.extract_core._match_1 c (option.some r) = option.some (c :: r)
- string.iterator.extract_core._match_1 c option.none = option.none
Equations
- string.iterator.extract {fst := p₁, snd := n₁} {fst := p₂, snd := n₂} = ite (p₁.reverse ++ n₁ ≠ p₂.reverse ++ n₂) option.none (ite (n₁ = n₂) (option.some "") (string.iterator.extract._match_1 (string.iterator.extract_core n₁ n₂)))
- string.iterator.extract._match_1 (option.some r) = option.some {data := r}
- string.iterator.extract._match_1 option.none = option.none
@[instance]
Equations
- string.inhabited = {default := ""}
@[instance]
Equations
@[instance]
Equations
Equations
- string.join l = list.foldl (λ (r s : string), r ++ s) "" l
Equations
- s.intercalate ss = (s.to_list.intercalate (list.map string.to_list ss)).as_string
Equations
Equations
- s.popn_back n = (s.mk_iterator.to_end.prevn n).prev_to_string
Equations
- s.backn n = (s.mk_iterator.to_end.prevn n).next_to_string