def string_title_operation(string: StringVar[Any]):
    """Convert a string to title case.

    Args:
        string: The string to convert.

    Returns:
        The title case string.
    """
    return var_operation_return(
        js_expression=f"{string}.split(' ').map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(' ')",
        var_type=str,
    )
Convert a string to title case.

    Args:
        string: The string to convert.

    Returns:
        The title case string.
    
reflex/vars/sequence.py