@staticmethod
def quote_string(string: str) ->str:
    """
        Enclose a string in double-quotes, as required by LCDd when a
        command argument to LCDd involves embedded whitespace.

        :param string: string enclose in double quotes
        :return: string enclosed in double quotes, with embedded double quotes
                 escaped with a backslash
        """
    escaped = string.replace('"', '\\"')
    return f'"{escaped}"'
