Skip to content

Commit

Permalink
Improve performance of is_alphanumeric
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottPJones committed Oct 21, 2023
1 parent 93a301b commit 4507363
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
fail-fast: false
matrix:
version:
- '1.5'
- '1.6'
- '1.9'
- 'nightly'
os:
- ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords = ["Characters"]
license = "MIT"
desc = "Basic functionality for Chr type"
authors = ["ScottPJones <[email protected]>"]
version = "1.0.3"
version = "1.0.4"

[deps]
Unicode = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
Expand Down
2 changes: 1 addition & 1 deletion src/unicode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const _isnumeric_a = _isdigit
@inline _ispunct_l(ch) = ((UInt64(1) << (ch-0x80)) & 0x88c0_0882_0000_0000) != 0
@inline _isspace_l(ch) = (ch == 0x85) | (ch == 0xa0)
@inline _isalpha_l(ch) = ((0xff7f_ffff_ff7f_ffff_0420_0400_0000_0000 >>> (ch-0x80)) & 1) != 0
@inline _isalnum_l(ch) = _isalpha_l(ch) || _isnumeric_l(ch)
@inline _isalnum_l(ch) = ((0xff7f_ffff_ff7f_ffff_762c_0400_0000_0000 >>> (ch-0x80)) & 1) != 0
@inline _isprint_l(ch) = ((0xa0 <= ch <= 0xff) & (ch != 0xad))
@inline _isgraph_l(ch) = ((0xa0 < ch <= 0xff) & (ch != 0xad))

Expand Down

0 comments on commit 4507363

Please sign in to comment.