Data Science Desktop Survival Guide
by Graham Williams |
|||||
Length of String |
str_length("hello world")
str_length(c("hello", "world"))
str_length(NULL)
str_length(NA)
The function base::nchar() is the traditional approach. |
nchar("hello world")
nchar(c("hello", "world"))
nchar(NULL)
nchar(NA)
|