Logo Search packages:      
Sourcecode: ldb version File versions  Download package

char* ldb_binary_encode_string ( void *  mem_ctx,
const char *  string 

Encode a string

This function encodes a string using the encoding rules in RFC 2254 (Section 4). This function also escapes any non-printable characters.

mem_ctx the memory context to allocate the return string in.
string the string to be encoded
the encoded data as a null terminated string
See also:
RFC 2252.

Definition at line 133 of file ldb_parse.c.

References ldb_val::data, and ldb_val::length.

      struct ldb_val val;
      val.data = discard_const_p(uint8_t, string);
      val.length = strlen(string);
      return ldb_binary_encode(mem_ctx, val);

Generated by  Doxygen 1.6.0   Back to index