String Title
The string::title function converts a string to title case, capitalizing the first letter of each word.
Syntax
string::title(<string>)Parameters
string: The input string to be converted to title case.
Returns
- String: A new string with the first letter of each word capitalized.
Example
string::title("hello world")This function is useful for formatting strings in a more readable or formal style.