Charset.best

Computes the best charset to use to encode this text buffer.

struct Charset
static
string
best
(
string inbuf
)

Parameters

inbuf string

a UTF-8 text buffer

Return Value

Type: string

the charset name best suited for the input text or null if it is ascii-safe.