str_tokenise {levitate}R Documentation

Tokenise a string

Description

Splits an input string into tokens. A wrapper for strsplit() with a predefined split regex of ⁠[^[:alnum:]]⁠, i.e. anything except ⁠[a-zA-Z0-9]⁠.

Usage

str_tokenise(x, split = "[^[:alnum:]]+")

Arguments

x

The input string. Non-character inputs will be coerced with as.character().

split

The regular expression to split on. See strsplit().

Value

A list containing one character vector for each element of x.


[Package levitate version 0.2.0 Index]