stri_count_charclass(c("stRRRingi", "STrrrINGI", "123"),
c("\\p{Ll}", "\\p{Lu}", "\\p{Zs}"))
stri_count_charclass("\t\n", "\\p{WHITE_SPACE}") # white space - binary property
stri_count_charclass("\t\n", "\\p{Z}") # whitespace - general category (note the difference)
Run the code above in your browser using DataLab