Skip to contents

Intuitive alias for nchar().

Usage

strLen(x, ...)

Arguments

x

a character vector

...

further arguments passed to nchar

Value

An integer vector with the number of characters of the elements of x, see nchar().

See also

base::nchar()

string-overview for an overview of all string utilities in pharos.

Examples

strLen(c("pharos", "", NA))
#> [1]  6  0 NA
strLen(month.name)
#>  [1] 7 8 5 5 3 4 4 6 9 7 8 8

# a number is converted to a string first
strLen(123456)
#> [1] 6