Skip to contents

Error for prohibited padding or more than 1 char

Usage

.check_forbidden_pad(pad = "")

Arguments

pad

char: if pasting characters to a tab name, what character do you want to use to pad so numbers align, (e.g. '0' for '001' or '.' for '..1' if 3 digits of differentiation are necessary). Must be at least 1 character but no longer. Can be a space ' ', but cannot be any of the forbidden characters described in details

Value

a single character; throws an error if input is any of these characters \/:?*'[]

See also

Examples

xlr:::.check_forbidden_pad('.')
#> [1] "."
xlr:::.check_forbidden_pad('-')
#> [1] "-"
if (FALSE) {

# expect errors for the below: \/:?*'[]

xlr:::.check_forbidden_pad(':')
xlr:::.check_forbidden_pad('')
xlr:::.check_forbidden_pad(NA)
xlr:::.check_forbidden_pad(NULL)
xlr:::.check_forbidden_pad("\\")

}