nchar.String: Gets the number of characters in the string

Description Usage Value Author(s) Examples

Description

Gets the number of characters in the string.

Usage

1
2
## S3 method for class 'String'
nchar(this, ...)

Value

Returns the number of characters. If the string is empty, 0 is returned.

Author(s)

Henrik Bengtsson (http://www.braju.com/R/)

Examples

1
2
3
  s <- String("Hello world!")
  nchar(s)               # 12
  nchar("Hello world!")  # 12

HenrikBengtsson/R.lang documentation built on May 8, 2019, 7:50 p.m.