Documentation

Init.Data.String.Lemmas.IsEmpty

theorem String.Slice.isEmpty_iff_forall_eq {s : Slice} :
s.isEmpty = true ↔ ∀ (p q : s.Pos), p = q
@[simp]
@[simp]
@[simp]
theorem String.isEmpty_iff {s : String} :
s.isEmpty = true ↔ s = ""
theorem String.eq_empty_iff_forall_eq {s : String} :
s = "" ↔ ∀ (p q : s.Pos), p = q
theorem String.ne_empty_of_lt {s : String} {p q : s.Pos} :
p < q → s ≠ ""
@[simp]
@[simp]
theorem String.isEmpty_sliceTo {s : String} {p : s.Pos} :
@[simp]
theorem String.isEmpty_slice {s : String} {p₁ p₂ : s.Pos} {h : p₁ ≤ p₂} :
(s.slice p₁ p₂ h).isEmpty = true ↔ p₁ = p₂
@[simp]
theorem String.isEmpty_slice_eq_false_iff {s : String} {p₁ p₂ : s.Pos} {h : p₁ ≤ p₂} :
(s.slice p₁ p₂ h).isEmpty = false ↔ p₁ ≠ p₂
@[simp]
theorem String.Slice.isEmpty_slice {s : Slice} {p₁ p₂ : s.Pos} {h : p₁ ≤ p₂} :
(s.slice p₁ p₂ h).isEmpty = true ↔ p₁ = p₂
@[simp]
theorem String.Slice.isEmpty_slice_eq_false_iff {s : Slice} {p₁ p₂ : s.Pos} {h : p₁ ≤ p₂} :
(s.slice p₁ p₂ h).isEmpty = false ↔ p₁ ≠ p₂
@[simp]
theorem String.length_eq_zero_iff {s : String} :
s.length = 0 ↔ s = ""