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

Confilicts in equality with standard strings #74

Closed
adomasbaliuka opened this issue Feb 22, 2024 · 2 comments
Closed

Confilicts in equality with standard strings #74

adomasbaliuka opened this issue Feb 22, 2024 · 2 comments

Comments

@adomasbaliuka
Copy link

adomasbaliuka commented Feb 22, 2024

There is a method ==(y::InlineString, x::String) but there isn't a matching !==.

julia> String31("a") == "a"
true

julia> String31("a") !== "a"
true

Versions

(jl_Ut5bpn) pkg> st
Status `/tmp/jl_Ut5bpn/Project.toml`
  [842dd82b] InlineStrings v1.4.0
julia> versioninfo()
Julia Version 1.10.1
Commit 7790d6f0641 (2024-02-13 20:41 UTC)
Build Info:
  Official https://julialang.org/ release
@bkamins
Copy link

bkamins commented Feb 22, 2024

This is the same behavior as in Julia Base. See e.g. strings in Base:

julia> x = "a"
"a"

julia> y = SubString("a", 1, 1)
"a"

julia> x === y
false

julia> x !== y
true

julia> x != y
false

julia> x == y
true

@adomasbaliuka
Copy link
Author

adomasbaliuka commented Feb 22, 2024

I see... Thanks and sorry for the issue

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

No branches or pull requests

2 participants