Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename functions in Ascii #14401

Merged
merged 2 commits into from
May 24, 2014
Merged

Rename functions in Ascii #14401

merged 2 commits into from
May 24, 2014

Conversation

aochagavia
Copy link
Contributor

Some functions implemented for the Ascii struct have the same functionality as other functions implemented for the normal chars. For consistency, I think they should have the same name, so I renamed the functions in Ascii to match the names in the Char trait.

  • Renamed to_lower to to_lowercase
  • Renamed to_upper to to_uppercase
  • Renamed is_alpha to is_alphabetic
  • Renamed is_alnum to is_alphanumeric
  • Renamed is_lower to is_lowercase
  • Renamed is_upper to is_uppercase

[breaking-change]

Some functions implemented for the Ascii struct have the same functionality as other functions implemented for the normal chars. For consistency, I think they should have the same name, so I renamed the functions in Ascii to match the names in the Char trait.

* Renamed `to_lower` to `to_lowercase`
* Renamed `to_upper` to `to_uppercase`
* Renamed `is_alpha` to `is_alphabetic`
* Renamed `is_alnum` to `is_alphanumeric`
* Renamed `is_lower` to `is_lowercase`
* Renamed `is_upper` to `is_uppercase`

[breaking-change]
@emberian
Copy link
Member

I originally named them to match the names that ctypes.h uses. I think this is good though.

@aochagavia
Copy link
Contributor Author

The tests failed because runtest used one of the renamed functions. I have updated it now.

bors added a commit that referenced this pull request May 24, 2014
Some functions implemented for the Ascii struct have the same functionality as other functions implemented for the normal chars. For consistency, I think they should have the same name, so I renamed the functions in Ascii to match the names in the Char trait.

* Renamed `to_lower` to `to_lowercase`
* Renamed `to_upper` to `to_uppercase`
* Renamed `is_alpha` to `is_alphabetic`
* Renamed `is_alnum` to `is_alphanumeric`
* Renamed `is_lower` to `is_lowercase`
* Renamed `is_upper` to `is_uppercase`

[breaking-change]
@bors bors closed this May 24, 2014
@bors bors merged commit e998958 into rust-lang:master May 24, 2014
@aochagavia aochagavia deleted the pr4 branch May 28, 2014 14:22
@SimonSapin SimonSapin mentioned this pull request Dec 16, 2014
SimonSapin added a commit to SimonSapin/rust that referenced this pull request Dec 24, 2014
bors added a commit that referenced this pull request Dec 27, 2014
Implements [RFC 486](rust-lang/rfcs#486). Fixes #19908.

* Rename `to_ascii_{lower,upper}` to `to_ascii_{lower,upper}case`, per #14401
* Remove the `Ascii` type and associated traits: `AsciiCast`, `OwnedAsciiCast`, `AsciiStr`, `IntoBytes`, and `IntoString`.
* As a replacement, add `.is_ascii()` to `AsciiExt`, and implement `AsciiExt` for `u8` and `char`.

[breaking-change]
bors added a commit that referenced this pull request Dec 27, 2014
Implements [RFC 486](rust-lang/rfcs#486). Fixes #19908.

* Rename `to_ascii_{lower,upper}` to `to_ascii_{lower,upper}case`, per #14401
* Remove the `Ascii` type and associated traits: `AsciiCast`, `OwnedAsciiCast`, `AsciiStr`, `IntoBytes`, and `IntoString`.
* As a replacement, add `.is_ascii()` to `AsciiExt`, and implement `AsciiExt` for `u8` and `char`.

[breaking-change]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants