str_mid: Returns a string containing a specified number of characters...

View source: R/string_tools.R

str_midR Documentation

Returns a string containing a specified number of characters from a string

Description

Returns a string containing a specified number of characters from a string

Usage

str_mid(text, idx_start, qty_characters = NA)

Arguments

text

The string you want the get a piece of

idx_start

Character position in string at which the part to be taken begins. If start is greater than the number of characters in string, NA will be returned.

qty_characters

If omitted or if there are fewer than length characters in the text (including the character at start), all characters from the start position to the end of the string are returned.

Value

A string

Examples

str_mid(text = "A long, long time ago", idx_start = 89)
str_mid(text = "A long, long time ago", idx_start = 9, qty_characters = 9)

mark-me/graydon.package documentation built on Nov. 14, 2023, 5:31 p.m.