Skip to content

Commit

Permalink
Clarifying ispunct behavior difference between Julia and C in documen…
Browse files Browse the repository at this point in the history
…tation (#56727)

Fixes #56680. This PR updates the documentation for the ispunct function
in Julia to explicitly note its differing behavior from the similarly
named function in C.

---------

Co-authored-by: Lilith Orion Hafner <[email protected]>
  • Loading branch information
Priynsh and LilithHafner authored Dec 1, 2024
1 parent ef32806 commit ea42112
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions base/strings/unicode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -534,11 +534,17 @@ iscntrl(c::AbstractChar) = c <= '\x1f' || '\x7f' <= c <= '\u9f'
Tests whether a character belongs to the Unicode general category Punctuation, i.e. a
character whose category code begins with 'P'.
!!! note
This behavior is different from the `ispunct` function in C.
# Examples
```jldoctest
julia> ispunct('α')
false
julia> ispunct('=')
false
julia> ispunct('/')
true
Expand Down

0 comments on commit ea42112

Please sign in to comment.