filesstrings (version 0.3.2)

StrElem: Extract a single character of a string, using its index.

Description

Extract a single character of a string, using its index.

Usage

StrElem(string, index)

Arguments

string
A string.
index
An integer. Negative indexing is allowed as in stringr::str_sub().

Value

A one-character string.

Examples

Run this code
StrElem("abcd", 3)
StrElem("abcd", -2)

Run the code above in your browser using DataLab