ecl-logo Documentation

StringFirst

StringFirst[string]firstCharacter

returns the first character of the input string.

Details

    Input
    Output

Examples

Basic Examples  (3)

Extract the first character of a string:

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

StringFirst is equivalent to using StringTake[str,1]:

Additional Examples  (2)

Extract the first nucleotide from a DNA sequence:

StringFirst does not work on empty strings:

Attributes  (1)

Listable  (1)

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