Skip to contents

strs_len returns the number of characters in string. It is similar to Python's str.__len__().

Usage

strs_len(string)

Arguments

string

A character vector of strings.

Value

A numeric vector where each element corresponds to the number of characters.

Examples

strs_len(c("hello", "world"))
#> [1] 5 5