Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up<ctype.h> functions for AsciiExt #39658
Comments
zackw
added a commit
to zackw/rust
that referenced
this issue
Feb 8, 2017
zackw
referenced this issue
Feb 8, 2017
Merged
Add equivalents of C's <ctype.h> functions to AsciiExt. #39659
frewsxcv
added
the
A-libs
label
Feb 9, 2017
alexcrichton
added
B-unstable
T-libs
labels
Feb 13, 2017
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Feb 14, 2017
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Feb 14, 2017
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Feb 14, 2017
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Feb 14, 2017
steveklabnik
removed
the
A-libs
label
Mar 24, 2017
This comment has been minimized.
This comment has been minimized.
|
Stabilize? I just wrote |
This comment has been minimized.
This comment has been minimized.
|
There was a request over in #39659 to deprecate |
Mark-Simulacrum
added
the
C-tracking-issue
label
Jul 22, 2017
This comment has been minimized.
This comment has been minimized.
|
What's the status here? Could I try to "deprecate AsciiExt and convert all the methods to intrinsics on |
This comment has been minimized.
This comment has been minimized.
|
From my end it's just lack of time. I think the team would be glad to at
least look at a patch if you made one.
|
This comment has been minimized.
This comment has been minimized.
|
Right now What do you think? |
This comment has been minimized.
This comment has been minimized.
|
I’ve definitely used |
LukasKalbertodt
referenced this issue
Aug 22, 2017
Merged
Copy all `AsciiExt` methods to the primitive types directly in order to deprecate it later #44042
Ms2ger
referenced this issue
Sep 20, 2017
Open
Tracking: Unstable Rust feature gates used by Servo #5286
This comment has been minimized.
This comment has been minimized.
|
CC @alexcrichton / @rust-lang/libs for FCP to stabilize as inherent methods: #44042 |
This comment has been minimized.
This comment has been minimized.
|
@rfcbot fcp merge |
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Oct 3, 2017
•
|
Team member @aturon has proposed to merge this. The next step is review by the rest of the tagged teams: Concerns:
Once these reviewers reach consensus, this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
rfcbot
added
the
proposed-final-comment-period
label
Oct 3, 2017
This comment has been minimized.
This comment has been minimized.
|
The semantics of e.g.
Would it be bad to require the user to be more explicit in some of these cases? s.bytes().all(|b| b.is_ascii_hexdigit())@rfcbot concern str and [u8] methods |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Discussed at the libs triage meeting today, we're going to scope this issue to be blocked on #44042 and then we'll stabilize these methods only on the |
bors
added a commit
that referenced
this issue
Oct 31, 2017
bors
added a commit
that referenced
this issue
Nov 4, 2017
bors
added a commit
that referenced
this issue
Nov 4, 2017
bors
closed this
in
#46077
Nov 29, 2017
rfcbot
removed
the
proposed-final-comment-period
label
Nov 29, 2017
spastorino
added a commit
to spastorino/rust
that referenced
this issue
Dec 5, 2017
This comment has been minimized.
This comment has been minimized.
codeyash
commented
Feb 22, 2018
|
Any update here? |
This comment has been minimized.
This comment has been minimized.
|
Rust 1.24 was recently released with these methods available as inherent methods of I think we can now deprecate the |
nagisa
reopened this
Feb 22, 2018
This comment has been minimized.
This comment has been minimized.
|
Reopened as per request on IRC. |
This comment has been minimized.
This comment has been minimized.
zbraniecki
commented
Mar 7, 2018
|
Is it still the plan to get at least |
This comment has been minimized.
This comment has been minimized.
|
@zbraniecki We decided that we prefer the explicit version of |
SimonSapin
added a commit
to SimonSapin/rust
that referenced
this issue
Mar 17, 2018
SimonSapin
referenced this issue
Mar 17, 2018
Merged
Deprecate the AsciiExt trait in favor of inherent methods #49109
SimonSapin
added a commit
to SimonSapin/rust
that referenced
this issue
Mar 17, 2018
This comment has been minimized.
This comment has been minimized.
|
Deprecation PR for the |
kennytm
added a commit
to kennytm/rust
that referenced
this issue
Mar 21, 2018
SimonSapin
added a commit
to SimonSapin/rust
that referenced
this issue
Mar 21, 2018
kennytm
added a commit
to kennytm/rust
that referenced
this issue
Mar 21, 2018
kennytm
added a commit
to kennytm/rust
that referenced
this issue
Mar 22, 2018
kennytm
added a commit
to kennytm/rust
that referenced
this issue
Mar 22, 2018
alexcrichton
closed this
in
#49109
Mar 22, 2018
This comment has been minimized.
This comment has been minimized.
|
Shouldn't this issue also track "removing of unstable |
This comment has been minimized.
This comment has been minimized.
|
I don’t know how useful it is to track such features individually. We can occasionally do a pass on the entire standard library looking for items that are both unstable and have been deprecated for a while. |
This comment has been minimized.
This comment has been minimized.
|
@SimonSapin Ah, I missed the fact that the unstable methods were also marked deprecated. That makes sense then! |
gerd2002
pushed a commit
to MegatonHammer/rust
that referenced
this issue
Apr 2, 2018
LukasKalbertodt
referenced this issue
Apr 4, 2018
Merged
Add is_whitespace and is_alphanumeric to str. #49381
This comment has been minimized.
This comment has been minimized.
BartMassey
commented
Jun 11, 2018
|
I'm disappointed that there is now no officially-supported version of |
This comment has been minimized.
This comment has been minimized.
|
@BartMassey IMO However, what one might be looking for, and not realize that Forcing users to write (Maybe |
This comment has been minimized.
This comment has been minimized.
BartMassey
commented
Jun 12, 2018
|
That is an interesting point. There are certainly a number of fine distinctions that can be drawn here: one might reasonably expect that That said, I still feel like the There's an underlying problem here in that anything we do to make ASCII more of a first-class citizen is a step toward encouraging folks to routinely write ASCII-only programs. Nobody wants that. Having said that, tutorials and examples almost always use and pretty much depend on ASCII: things like Exercism and the Advent Of Code series have caused me an occasional "any other language" kind of feeling because the exercises just assume quality ASCII support. Asking newer users to understand how to write the appropriate iterators to complete these exercises seems to me like it might have its own set of issues. I don't know. I guess I just need to identify or write a crate that has good support for ASCII-only strings and chars and start using it in situations where that's what I'm working with. For now, |
This comment has been minimized.
This comment has been minimized.
For what it’s worth the addition of
Interesting, because this behavior is neither Anyway, it’s always possible to add more methods but a closed issue may not be the best place to propose them. |
zackw commentedFeb 8, 2017
•
edited
As discussed at https://internals.rust-lang.org/t/improvements-to-asciiext/4689 I have added
is_ascii_*equivalents of most (not quite all) of C'sctype.h'sisxxxfunctions to the AsciiExt trait.The new functions are
is_ascii_alphabeticis_ascii_uppercaseis_ascii_lowercaseis_ascii_alphanumericis_ascii_digitis_ascii_hexdigitis_ascii_punctuationis_ascii_graphicis_ascii_whitespace(matches the Infra Standard definition of ASCII whitespace, not POSIX)is_ascii_controlThey are implemented for
char,u8,str, and[u8], and, for backward compatibility with external trait implementations, have default implementations that callunimplemented!().PR to follow, but I needed to file this bug in order to get an issue number to put in the stability annotations.