Skip to contents

This function checks whether a given string ends with a digit.

Usage

endsWithDigit(string)

Arguments

string

The input string to be checked

Value

TRUE if the string ends with a digit, FALSE otherwise

Examples

endsWithDigit("abc123")  # Output: TRUE
#> [1] TRUE
endsWithDigit("xyz")     # Output: FALSE
#> [1] FALSE