function amf0encString(str) {
  let buf = Buffer.alloc(3);
  buf.writeUInt8(0x02, 0);
  buf.writeUInt16BE(str.length, 1);
  return Buffer.concat([buf, Buffer.from(str, "utf8")]);
}
AMF0 Encode String
@param {string} str
@returns {Buffer}