Learn R Programming

pystr (version 2.0.0)

pystr_istitle: Check if a string is titlecase.

Description

Return TRUE if the string is a titlecased string and there is at least one character, for example uppercase characters may only follow uncased characters and lowercase characters only cased ones. Return FALSE otherwise.

Usage

pystr_istitle(str)

Arguments

str
A character vector.

Value

A logical vector.

References

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

Examples

Run this code
pystr_istitle("I Am A Title")
pystr_istitle("I Am not A Title")

Run the code above in your browser using DataLab