Return last characters from strings

lastChar(str)

Arguments

str

A vector of character strings

Value

A vector of the same length, containing last characters

Examples

lastChar("Go tell it on the mountain")
#> [1] "n"
lastChar(c("HSV", "FCB", "BVB"))
#> [1] "V" "B" "B"