ecl-logo Documentation

StringLast

StringLast[string]lastCharacter

returns the last character of the input string.

Details

    Input
    Output

Examples

Basic Examples  (3)

Extract the last character of a string:

Extracts the last characters, even if they are not alphanumeric:

StringLast is equivalent to using StringTake[str,-1]:

Additional Examples  (2)

Extract the last nucleotide from a DNA sequence:

StringLast does not work on empty strings:

Attributes  (1)

Listable  (1)

Extracts the last character of each string in a list of strings: