Learn R Programming

FastUtils (version 0.2.1)

substrEnd: Extract Substring from Start to End Difference

Description

Extract a substring from a given start position to the position determined by subtracting endDiff from the string length.

Usage

substrEnd(x, start, endDiff)

Value

A substring of the input character string.

Arguments

x

A character string from which the substring is extracted.

start

The starting position for the substring extraction.

endDiff

The difference to subtract from the string length to determine the end position.

See Also

Examples

Run this code
substrEnd("12345", 1, 1)
substrEnd("12345", 1, 2)
substrEnd("12345", 2, 3)

Run the code above in your browser using DataLab