Learn R Programming

pystr (version 2.0.0)

pystr_lstrip: Left strip a string.

Description

Return a copy of the string with leading characters removed.

Usage

pystr_lstrip(str, chars = " ")

Arguments

str
A character vector.
chars
A character string.

Value

A character vector.

Details

The chars argument is a string specifying the set of characters to be removed. If omitted, the chars argument defaults to removing whitespace. The chars argument is not a prefix; rather, all combinations of its values are stripped.

References

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

See Also

pystr_rstrip

Examples

Run this code
pystr_lstrip("     spacious    ")
pystr_lstrip("www.example.com", "w.")

Run the code above in your browser using DataLab