@@ -12,7 +12,7 @@ using StrTables
12
12
13
13
VER = UInt32 (1 )
14
14
15
- immutable HTML_Table{T} <: AbstractEntityTable
15
+ struct HTML_Table{T} <: AbstractEntityTable
16
16
ver:: UInt32
17
17
tim:: String
18
18
inf:: String
@@ -44,7 +44,7 @@ function _get_str(ind)
44
44
string (Char (val>>> 16 ), Char (val& 0xffff ))
45
45
end
46
46
47
- function _get_strings {T} (val:: T , tab:: Vector{T} , ind:: Vector{UInt16} )
47
+ function _get_strings (val:: T , tab:: Vector{T} , ind:: Vector{UInt16} ) where {T}
48
48
rng = searchsorted (tab, val)
49
49
isempty (rng) && return _empty_str_vec
50
50
_tab. nam[ind[rng]]
@@ -55,10 +55,11 @@ function lookupname(str::AbstractString)
55
55
isempty (rng) ? _empty_str : _get_str (_tab. ind[rng. start])
56
56
end
57
57
58
- matchchar (ch:: Char ) =
59
- (ch <= ' \u ffff '
58
+ matchchar (ch:: UInt32 ) =
59
+ (ch <= 0x0ffff
60
60
? _get_strings (ch% UInt16, _tab. val16, _tab. ind16)
61
- : (ch <= ' \U 1ffff' ? _get_strings (ch% UInt16, _tab. val32, _tab. ind32) : _empty_str_vec))
61
+ : (ch <= 0x1ffff ? _get_strings (ch% UInt16, _tab. val32, _tab. ind32) : _empty_str_vec))
62
+ matchchar (ch:: Char ) = matchchar (UInt32 (ch))
62
63
63
64
matches (str:: AbstractString ) = matches (convert (Vector{Char}, str))
64
65
function matches (vec:: Vector{Char} )
0 commit comments