-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Closed
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
The standard library has several functions for printing escaped text:
char::escape_defaultfor printing escaped Unicode charactersstr::escape_defaultfor printing escaped Unicode stringsstd::ascii::escape_defaultfor printing escaped ASCII bytes
I propose that we add associated functions to u8 and [u8] that are like
{char,str}::escape_default but for ASCII. The std::ascii::escape_default
function is not very discoverable – I was expecting a u8::escape_default
function like for char – and in fact I was about to post a question on
Stack Overflow when I found it in the std docs and posted an answer to
help others who also don't realize the existence of std::ascii::escape_default.
Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.