• Creates a Buffer object from a string.

    Parameters

    • str: string

      String

    • Optional encoding: Encoding

      Character string encoding format. The default value is UTF8.

    Returns Buffer