strings.title

Functions

sentence_to_title_case(→ str)

Converts a string to title case, preserving the input as is

to_title_case(→ str)

Converts a string to capitalized case, preserving the input as is

Module Contents

strings.title.sentence_to_title_case(input_str: str) str

Converts a string to title case, preserving the input as is

>>> sentence_to_title_case("Aakash Giri")
'Aakash Giri'
>>> sentence_to_title_case("aakash giri")
'Aakash Giri'
>>> sentence_to_title_case("AAKASH GIRI")
'Aakash Giri'
>>> sentence_to_title_case("aAkAsH gIrI")
'Aakash Giri'
strings.title.to_title_case(word: str) str

Converts a string to capitalized case, preserving the input as is

>>> to_title_case("Aakash")
'Aakash'
>>> to_title_case("aakash")
'Aakash'
>>> to_title_case("AAKASH")
'Aakash'
>>> to_title_case("aAkAsH")
'Aakash'