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

deprecate string methods of character predicates, e.g. isnumber("") #20342

Merged
merged 1 commit into from
Feb 1, 2017

Conversation

JeffBezanson
Copy link
Member

fixes #14156

@test isalpha("23435")==false
@test iscntrl( string(Char(0x0080))) == true
@test ispunct( "‡؟჻") ==true
@test all(isspace," \t \n \r ")==true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, maybe change == into === or remove them altogether?

true

julia> isxdigit("0x9")
julia> isxdigit('z')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 0 and x cases where interesting to show that the prefix wasn't considered as a valid hexadecimal digit. Say this in the docstring?

@@ -1849,4 +1849,10 @@ end)

@deprecate FloatRange{T}(start::T, step, len, den) Base.floatrange(T, start, step, len, den)

for name in ("alnum", "alpha", "cntrl", "digit", "number", "graph",
"lower", "print", "punct", "space", "upper", "isxdigit")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you want just "xdigit" for the last one.

@kshyatt kshyatt added deprecation This change introduces or involves a deprecation strings "Strings!" labels Jan 31, 2017
Copy link
Member

@ararslan ararslan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@JeffBezanson JeffBezanson added this to the 0.6.0 milestone Jan 31, 2017
@JeffBezanson JeffBezanson merged commit 567b7c2 into master Feb 1, 2017
@ararslan ararslan deleted the jb/unliftcharpredicates branch February 1, 2017 22:19
@Sacha0 Sacha0 added the needs news A NEWS entry is required for this change label May 13, 2017
@tkelman tkelman removed the needs news A NEWS entry is required for this change label May 14, 2017
tkelman pushed a commit that referenced this pull request May 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation This change introduces or involves a deprecation strings "Strings!"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

isnumber("") return true
7 participants