Skip to main content

title

Function title 

Source
pub fn title<D: Dimension>(a: &StringArray<D>) -> FerrayResult<StringArray<D>>
Expand description

Title-case each string element: each word starts with a titlecased character and all remaining cased characters are lowercased, matching Python str.title / numpy.char.title.

A character is word-initial when the preceding character is not cased (digits and punctuation are not cased, so a letter following one is titlecased). The tail uses the whole-string lowercase so a word-final Σ becomes ς (final sigma) per the Unicode Final_Sigma rule.

§Errors

Returns an error if the internal array construction fails.