libcoap  4.1.1
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Data Structures | Macros | Functions
str.h File Reference
#include <string.h>

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

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

Definition at line 19 of file str.h.

Function Documentation

void coap_delete_string ( str )

Deletes the given string and releases any memory allocated.

Definition at line 31 of file str.c.

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.