mkitti / StaticStrings.jl

Fixed-length strings in Julia represented by NTuples
MIT License
13 stars 2 forks source link

`==` doesn't work for `SubStaticString` #14

Closed nhz2 closed 1 year ago

nhz2 commented 1 year ago
julia> using StaticStrings

julia> a = SubStaticString("hello",1:2)
substatic"he"5

julia> b = SubStaticString("hello",3:4)
substatic"ll"5

julia> a == b
true

Also, is there a difference between SubStaticString{N} and just SubString{StaticString{N}}?

mkitti commented 1 year ago

This is a bug. There is a difference in that SubStaticString is itself an AbstractStaticString.

mkitti commented 1 year ago

Fixed in #16, 0.2.4

mkitti commented 1 year ago

Actually fixed in #17, 0.2.5

julia> using StaticStrings

julia> a = SubStaticString("hello",1:2)
substatic"he"5

julia> b = SubStaticString("hello",3:4)
substatic"ll"5

julia> a == b
false