fast_nchar: Fast nchar that can be used on integers and strings

Description Usage Arguments Value

View source: R/fast_nchar.R

Description

Fast nchar that can be used on integers and strings

Usage

1
2
3
4
5

Arguments

x

Either an integer or character vector.

Value

Same as nchar(x).

max_nchar(x) returns the max(nchar(x)) with the exception that length-zero inputs return zero, not -Inf, since negative-length strings are not possible.

const_nchar returns the width of every string in x if and only if every element's width is the same. Otherwise, -1.


HughParsonage/dhhs documentation built on Dec. 17, 2021, 11:22 p.m.