@[protected, instance]
Equations
- s₁.has_decidable_lt s₂ = s₁.data.has_decidable_lt s₂.data
@[protected, 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 (is_true p) = is_true _
- string.has_decidable_eq._match_1 x y (is_false p) = is_false _
Equations
- string.fold a f s = list.foldl f a s.to_list
@[protected]
Equations
- string.iterator.extract_core (c :: cs₁) cs₂ = ite (cs₁ = cs₂) (some [c]) (string.iterator.extract_core._match_1 c (string.iterator.extract_core cs₁ cs₂))
- string.iterator.extract_core list.nil cs = none
- string.iterator.extract_core._match_1 c (some r) = some (c :: r)
- string.iterator.extract_core._match_1 c none = none
Equations
- string.iterator.extract {fst := p₁, snd := n₁} {fst := p₂, snd := n₂} = ite (p₁.reverse ++ n₁ ≠ p₂.reverse ++ n₂) none (ite (n₁ = n₂) (some "") (string.iterator.extract._match_1 (string.iterator.extract_core n₁ n₂)))
- string.iterator.extract._match_1 (some r) = some {data := r}
- string.iterator.extract._match_1 none = none
@[protected, instance]
Equations
- string.inhabited = {default := ""}
@[protected, instance]
Equations
@[protected, 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
@[protected]