Lines Matching defs:str
932 * first byte as the length. !str is accepted for an empty string.
935 static int encode_str8(uint8_t *buf, const char *str)
938 if (!str)
939 str = "";
940 str_len = strlen(str);
941 if (str[0] && (unsigned)str[0] >= 0x20) { /* Make sure the string is not already encoded. */
942 const uint8_t *q = str;
954 memcpy(&buf[2], str, str_len);
963 memcpy(&buf[1], str, str_len);