leanprover / leanprover/lean4

Replace `String.fromUtf8Unchecked` with `String.fromUtf8?`

Open
#1,462 3 comments 1 reaction 1 assignee View on GitHub

@lovettchris is already working on this.

Since Aug 12, 2022.

enhancement P-low
Dominant language
Lean
Stars
9.2k
Forks
990
Avg merge
1d 17h
Merged PRs (30d)
175

Description

Unlike String.fromUtf8Unchecked, this one should check for valid UTF-8. In fact, since we have to decode the string anyway to figure out its character length, we might as well remove the former function.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.