strings / string_encode

Edit this article on Github.

SYNOPSIS

buffer string_encode(string str, string encoding);

DESCRIPTION

Encode the given string str(in UTF-8) using given encoding, return an buffer of bytes.

SEE ALSO

string_decode, buffer_transcode