1% Generated by roxygen2 (4.1.1): do not edit by hand 2% Please edit documentation in R/pystr_split.R 3\name{pystr_split} 4\alias{pystr_split} 5\title{Split a string.} 6\usage{ 7pystr_split(str, sep = " ", maxsplit = nchar(str) - 1) 8} 9\arguments{ 10\item{str}{A character vector.} 11 12\item{sep}{A character string.} 13 14\item{maxsplit}{A numeric integer.} 15} 16\value{ 17A list of character vectors. 18} 19\description{ 20Return a list of character vectors of the words in the string, using \code{sep} as the delimiter string. 21} 22\details{ 23If \code{maxsplit} is given, at most \code{maxsplit} splits are done 24(thus, the character vector will have at most \code{maxsplit + 1} elements). 25If \code{maxsplit} is not specified, then there is no limit on the number of 26splits (all possible splits are made). If \code{sep} is given, consecutive 27delimiters are not grouped together and are deemed to delimit empty strings. 28The \code{sep} argument may consist of multiple characters. If \code{sep} is 29not specified, any whitespace string is a separator. Splitting an empty 30string returns an empty string. 31} 32\examples{ 33pystr_split("www.example.com", ".") 34pystr_split("123123123", "2", 2) 35pystr_split("1,,2,3", ",") 36pystr_split("a--b--c", "--") 37} 38\references{ 39\url{https://docs.python.org/3/library/stdtypes.html#str.split} 40} 41\seealso{ 42\code{\link{pystr_join}}, \code{\link{pystr_rsplit}} 43} 44 45