Specify the maximum length of a character

constraints.checkMaxLength(constraint, value)

Arguments

constraint

numeric constraint, maximum character length

value

character to meet the constraint

Value

TRUE if character length is equal to or less than the constraint

See also

Examples

constraints.checkMaxLength(constraint = list(2), value = "hi")
#> [1] TRUE
constraints.checkMaxLength(constraint = 2, value = "hello")
#> [1] FALSE