RightmostCharacter() is a convenience function that returns the final character of a string.

RightmostCharacter(string, len = nchar(string))

Arguments

string

Character string.

len

(Optional) Integer specifying number of characters in string.

Value

RightmostCharacter() returns the rightmost character of a string.

See also

Other string parsing functions: EndSentence(), MorphoBankDecode(), Unquote()

Author

Martin R. Smith (martin.smith@durham.ac.uk)

Examples

RightmostCharacter("Hello, World!")
#> [1] "!"