Skip to content

Conversation

@Vaibhavdixit02
Copy link
Contributor

@Vaibhavdixit02 Vaibhavdixit02 commented Dec 27, 2017

I did a PR previously for this but after #24999 I felt that it would be better to do the changes again because some of the files changed in the previous PR were altered.

Fixes #24214.

Change in string.jl JuliaLang#24214
Copy link
Member

@StefanKarpinski StefanKarpinski left a comment

Choose a reason for hiding this comment

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

Looks good, how about adding a test?

@Vaibhavdixit02
Copy link
Contributor Author

Added a couple of tests.

@StefanKarpinski
Copy link
Member

There seems to be a whitespace error here, but it doesn't look like it was introduced by this PR.

@test isvalid(String, UInt8[0xfe, 0x80, 0x80, 0x80, 0x80, 0x80]) == false
# issue 24214, Check valid SubString
@test isvalid(SubString("teststring",1,5)) == true
@test isvalid(SubString(String(UInt8[0xfe, 0x80, 0x80, 0x80, 0x80, 0x80]), 1,2)) == false
Copy link
Member

Choose a reason for hiding this comment

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

There's trailing whitespace on the end of this line

Whitespace error
@Vaibhavdixit02
Copy link
Contributor Author

I did not pay attention to it earlier, sorry!

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.

no method matching isvalid(::SubString{String})

4 participants