Description Usage Arguments Details Value References See Also Examples
Return a list of character vectors of the words in the string, using sep as the delimiter string.
1 | pystr_split(str, sep = " ", maxsplit = nchar(str) - 1)
|
str |
A character vector. |
sep |
A character string. |
maxsplit |
A numeric integer. |
If maxsplit is given, at most maxsplit splits are done
(thus, the character vector will have at most maxsplit + 1 elements).
If maxsplit is not specified, then there is no limit on the number of
splits (all possible splits are made). If sep is given, consecutive
delimiters are not grouped together and are deemed to delimit empty strings.
The sep argument may consist of multiple characters. If sep is
not specified, any whitespace string is a separator. Splitting an empty
string returns an empty string.
A list of character vectors.
https://docs.python.org/3/library/stdtypes.html#str.split
1 2 3 4 | pystr_split("www.example.com", ".")
pystr_split("123123123", "2", 2)
pystr_split("1,,2,3", ",")
pystr_split("a--b--c", "--")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.