luasandbox  1.4.0
Generic Lua sandbox for dynamic data analysis
Classes | Typedefs | Functions
string.h File Reference

Heka message string. More...

#include "util.h"
Include dependency graph for string.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  lsb_const_string
 

Typedefs

typedef struct lsb_const_string lsb_const_string
 

Functions

LSB_UTIL_EXPORT void lsb_init_const_string (lsb_const_string *s)
 Initializes the struct to zero. More...
 
LSB_UTIL_EXPORT char * lsb_lua_string_unescape (char *d, const char *s, size_t *dlen)
 Lua string unescape. More...
 

Detailed Description

Heka message string.

Definition in file string.h.

Typedef Documentation

Function Documentation

LSB_UTIL_EXPORT void lsb_init_const_string ( lsb_const_string s)

Initializes the struct to zero.

Parameters
sPointer to the struct
LSB_UTIL_EXPORT char* lsb_lua_string_unescape ( char *  d,
const char *  s,
size_t *  dlen 
)

Lua string unescape.

The returned string is always NUL terminated, but can contain other NULs in its body.

Parameters
dPointer to the destination array where the content is to be unescaped.
sC string to be unescaped
dlenThe length of the destination array (must be 1 byte larger than the source string (for inclusion of the NUL terminator). After successful conversion the final length of the escaped string is written back to this value as it may not equal strlen(d).
Returns
char* A pointer to d or NULL on error.