Picks the substring starting from the first character
Arguments
- string
string
- n
(integer) Number of characters
Details
'n' can be in the interval [-len + 1, len] (both ends inclusive)
Examples
# \donttest{
tidyrules:::strHead(c("string", "string2"), 2)
#> [1] "st" "st"
tidyrules:::strHead(c("string", "string2"), -1)
#> [1] "strin" "string"
# }