Skip to contents

Luhn checksum (payment cards)

Usage

luhn_valid(x)

Arguments

x

A character vector of digit strings. Spaces and hyphens are ignored.

Value

A logical vector.

Examples

luhn_valid("4111 1111 1111 1111")
#> [1] TRUE