def string_capitalize_operation(string: StringVar[Any]):
    """Capitalize a string.

    Args:
        string: The string to capitalize.

    Returns:
        The capitalized string.
    """
    return var_operation_return(
        js_expression=f"(((s) => s.charAt(0).toUpperCase() + s.slice(1).toLowerCase())({string}))",
        var_type=str,
    )
Capitalize a string.

    Args:
        string: The string to capitalize.

    Returns:
        The capitalized string.
    
reflex/vars/sequence.py