Skip to content

Commit ea42112

Browse files
PriynshLilithHafner
andauthored
Clarifying ispunct behavior difference between Julia and C in documentation (#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]>
1 parent ef32806 commit ea42112

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

base/strings/unicode.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,11 +534,17 @@ iscntrl(c::AbstractChar) = c <= '\x1f' || '\x7f' <= c <= '\u9f'
534534
Tests whether a character belongs to the Unicode general category Punctuation, i.e. a
535535
character whose category code begins with 'P'.
536536
537+
!!! note
538+
This behavior is different from the `ispunct` function in C.
539+
537540
# Examples
538541
```jldoctest
539542
julia> ispunct('α')
540543
false
541544
545+
julia> ispunct('=')
546+
false
547+
542548
julia> ispunct('/')
543549
true
544550

0 commit comments

Comments
 (0)