void encode_utf8()

in src/codec/string.cpp [87:95]


void encode_utf8(std::string &out, unsigned p) {
  if (json_likely(p <= 0x7F)) {
    encode_utf8_1(out, p);
  } else if (json_likely(p <= 0x07FF)) {
    encode_utf8_2(out, p);
  } else {
    encode_utf8_3(out, p);
  }
}