stri_rand_strings
.
Moreover, the [:Letter:]
,
or with a (extended) Perl-style syntax, e.g. \p{L}
.
The complements of the above sets are
[:^Letter:]
and \P{L}
, respectively.The properties' names are normalized before matching (for example, the match is case-insensitive). Moreover, many names have short aliases.
Among predefined Unicode properties we find e.g.
Lu
for uppercase letters,WHITE_SPACE
,Each property provides access to the large and comprehensive
Unicode Character Database.
Generally, the list of properties available in
Please note that some classes may seem to overlap.
However, e.g. General Category Z
(some space) and Binary Property
WHITE_SPACE
matches different character sets.
[:punct:]
. ICU User Guide (see below)
states that in general they are not well-defined, so may end up
with something different than you expect.In particular, in POSIX-like regex engines, [:punct:]
stands for
the character class corresponding to the ispunct()
classification
function (check out man 3 ispunct
on UNIX-like systems).
According to ISO/IEC 9899:1990 (ISO C90), the ispunct()
function
tests for any printing character except for space or a character
for which isalnum()
is true. However, in a POSIX setting,
the details of what characters belong into which class depend
on the current locale. So the [:punct:]
class does not lead
to portable code (again, in POSIX-like regex engines).
So a POSIX flavor of [:punct:]
is more like
[\p{P}\p{S}]
in
stri_*_charclass
functions in Character classes are defined using UnicodeSet
patterns. Below we briefly summarize their syntax.
For more details refer to the bibliographic References below.
UnicodeSet -- ICU User Guide,
Properties -- ICU User Guide,
C/POSIX Migration -- ICU User Guide,
Unicode Script Data,
icu::Unicodeset Class Reference -- ICU4C API Documentation,
stri_trim
,
stri_trim
, stri_trim_both
,
stri_trim_left
,
stri_trim_right
;
stringi-search
Other stringi_general_topics: stringi-arguments
;
stringi-encoding
;
stringi-locale
;
stringi-search-boundaries
;
stringi-search-coll
;
stringi-search-fixed
;
stringi-search-regex
;
stringi-search
; stringi
,
stringi-package