libcoap  4.1.2
Data Structures | Macros | Functions
str.h File Reference
#include <string.h>
Include dependency graph for str.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  str
 

Macros

#define COAP_SET_STR(st, l, v)   { (st)->length = (l), (st)->s = (v); }
 

Functions

strcoap_new_string (size_t size)
 Returns a new string object with at least size bytes storage allocated. More...
 
void coap_delete_string (str *)
 Deletes the given string and releases any memory allocated. More...
 

Macro Definition Documentation

§ COAP_SET_STR

#define COAP_SET_STR (   st,
  l,
 
)    { (st)->length = (l), (st)->s = (v); }

Definition at line 20 of file str.h.

Function Documentation

§ coap_delete_string()

void coap_delete_string ( str )

Deletes the given string and releases any memory allocated.

Definition at line 31 of file str.c.

Here is the call graph for this function:

§ coap_new_string()

str* coap_new_string ( size_t  size)

Returns a new string object with at least size bytes storage allocated.

The string must be released using coap_delete_string();

Definition at line 17 of file str.c.

Here is the call graph for this function: