strHead {tidyrules} | R Documentation |
Vectorized semantic equivalent of 'head' for a string
Description
Picks the substring starting from the first character
Usage
strHead(string, n)
Arguments
string |
string |
n |
(integer) Number of characters |
Details
'n' can be in the interval [-len + 1, len] (both ends inclusive)
Value
A string
Examples
tidyrules:::strHead(c("string", "string2"), 2)
tidyrules:::strHead(c("string", "string2"), -1)
[Package tidyrules version 0.1.5 Index]