last_alpha: String methods

Description Usage Arguments Value Examples

View source: R/strings.R

Description

Extract the last alphabetic character (if available) from the characters of a string.

Usage

1
last_alpha(string)

Arguments

string

An object that inherits from class "character".

Value

Returns the last alphabetic character (A-Z or a-z) or NA if no alphabetic characters are found.

Examples

1
2
3
4
last_alpha("123abc")
last_alpha("123abc456")
last_alpha("123")
last_alpha("abc")

bgreenwell/bmisc documentation built on Sept. 24, 2019, 11:09 a.m.