pystr_endswith: Check the suffix of a string.

Description Usage Arguments Details Value References See Also Examples

Description

Return TRUE if the string str ends with the specified suffix, otherwise return FALSE.

Usage

1
pystr_endswith(str, suffix, start = 1, end = nchar(str))

Arguments

str

A character vector.

suffix

A character vector.

start

A numeric vector.

end

A numeric vector.

Details

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

Value

A logical vector.

References

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

See Also

pystr_startswith

Examples

1
2
3
pystr_endswith("selfie.jpg", ".jpg")
pystr_endswith("selfie.jpg", ".png")
pystr_endswith("hello world", "ello", 1, 5)

pystr documentation built on April 15, 2017, 12:30 a.m.

Related to pystr_endswith in pystr...