s_at: Returns the character at a position of a string.

View source: R/domain.R

s_atR Documentation

Returns the character at a position of a string.

Description

Returns the character at a position of a string.

Usage

s_at(string, position)

Arguments

string

A string.

position

A positive number.

Details

Calls substr(string, position, position).

Value

A character

Examples

s_at("123", 1)
s_at("123", 2)
s_at("123", 3)
s_at("123", 4)
s_at("123", 0)

genscore documentation built on May 31, 2023, 6:28 p.m.