pystr_partition: Partition a string.

Description Usage Arguments Details Value References See Also Examples

View source: R/pystr_partition.R

Description

Split the string at the first occurrence of sep, and return a list of character vectors containing the part before the separator, the separator itself, and the part after the separator.

Usage

1

Arguments

str

A character vector.

sep

A character string.

Details

If the separator is not found, return a character vector containing the string itself, followed by two empty strings.

Value

A list of character vectors.

References

https://docs.python.org/3/library/stdtypes.html#str.partition

See Also

pystr_rpartition

Examples

1
pystr_partition("onetwothreeonetwothree", "two")

nicolewhite/pystr documentation built on May 23, 2019, 5:09 p.m.