Skip to content

Commit

Permalink
Update appendix.a-safetyprop.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hxuhack authored Jan 4, 2025
1 parent a3a7213 commit f88a013
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/appendix.a-safetyprop.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,13 @@ Example API: [String::from_raw_parts()](https://doc.rust-lang.org/std/string/str

The content extracted from String `s` using slice index `I` must remain valid UTF-8.

**psp-12.3: ValidString(s, I)**: $$s.I \in \text{utf-8}$$
**psp-12.3: ValidString(s, I)**: $$s[I] \in \text{utf-8}$$

Example APIs: [String.get_unchecked()](https://doc.rust-lang.org/std/string/struct.String.html#method.get_unchecked), [String.get_unchecked_mut()](https://doc.rust-lang.org/std/string/struct.String.html#method.get_unchecked_mut)

The slice content ranging from `begin` to `end` within String s must be valid UTF-8.

**psp-12.4: ValidString(s, begin, end)**: $$s.(begin..end) \in \text{utf-8}$$
**psp-12.4: ValidString(s, begin, end)**: $$s[begin..end] \in \text{utf-8}$$

Example APIs: [String.slice_unchecked()](https://doc.rust-lang.org/std/string/struct.String.html#method.slice_unchecked), [String.slice_mut_unchecked()](https://doc.rust-lang.org/std/string/struct.String.html#method.slice_mut_unchecked)

Expand Down

0 comments on commit f88a013

Please sign in to comment.