File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name = " ShortStrings"
22uuid = " 63221d1c-8677-4ff0-9126-0ff0817b4975"
3- authors = [" Dai ZJ <zhuojia.dai@gmail.com>" , " ScottPJones <scottjones@alum.mit.edu>" ,
4- " Lyndon White <lyndon.white@invenialabs.co.uk>" ]
5- version = " 0.3.6"
3+ authors = [" Dai ZJ <zhuojia.dai@gmail.com>" , " ScottPJones <scottjones@alum.mit.edu>" , " Lyndon White <lyndon.white@invenialabs.co.uk>" ]
4+ version = " 0.3.7"
65
76[deps ]
87BitIntegers = " c3b6d118-76ef-56ca-8cc7-ebb389d030a1"
9- SortingAlgorithms = " a2af1166-a08f-5f64-846c-94a0d3cef48c"
108MurmurHash3 = " b10b62ed-fbae-5ea5-b934-abaf0477b71d"
9+ SortingAlgorithms = " a2af1166-a08f-5f64-846c-94a0d3cef48c"
1110
1211[compat ]
13- MurmurHash3 = " 1.1"
1412BitIntegers = " 0.2"
13+ MurmurHash3 = " 1.1"
1514SortingAlgorithms = " 0.3"
1615julia = " 1"
1716
Original file line number Diff line number Diff line change 101101 val
102102end
103103
104+ ShortString {T} (s:: AbstractString ) where T = ShortString {T} (String (s))
105+
104106function ShortString {T} (s:: Union{String,SubString{String}} ) where {T}
105107 sz = sizeof (s)
106108 sz === 0 && return ShortString {T} (T (0 ))
Original file line number Diff line number Diff line change 133133
134134 @test_throws ErrorException ShortString (" foobar" , 3 )
135135 @test_throws ErrorException ss " foobar" b3
136+
137+
138+ @test ShortString7 (Test. GenericString (" abcde" )) == " abcde"
139+ @test ShortString7 (Test. GenericString (" abcde" )) isa ShortString7
140+ @test ShortString7 (SubString (Test. GenericString (" abcde" ), 2 )) == " bcde"
141+ @test ShortString7 (SubString (Test. GenericString (" abcde" ), 2 )) isa ShortString7
136142end
137143
138144
You can’t perform that action at this time.
0 commit comments