pystr_startswith: Check the prefix of a string.

Description Usage Arguments Details Value References See Also Examples

View source: R/pystr_startswith.R

Description

Return TRUE if the string str starts with the specified prefix, otherwise return FALSE.

Usage

1
pystr_startswith(str, prefix, start = 1, end = nchar(str))

Arguments

str

A character vector.

prefix

A character vector.

start

A numeric vector.

end

A numeric vector.

Details

With optional start, test string beginning at that position. With optional end, stop comparing string at that position.

Value

A logical vector.

References

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

See Also

pystr_endswith

Examples

1
2
3
pystr_startswith("www.example.com", "www.")
pystr_startswith("example.com", "www.")
pystr_startswith("www.example.com", "example", 5)

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