cctools
Functions
string_array.h File Reference

Single Memory Block String Array. More...

Go to the source code of this file.

Functions

char ** string_array_new (void)
 Create a new empty string array. More...
 
char ** string_array_append (char **oarray, const char *str)
 Append str to the string array. More...
 

Detailed Description

Single Memory Block String Array.

Allows the creation of string array inside a single memory block that can be therefore freed using free(). Pointers in the string array may move during calls to this library.

Function Documentation

char** string_array_new ( void  )

Create a new empty string array.

Returns
New string array.
char** string_array_append ( char **  oarray,
const char *  str 
)

Append str to the string array.

It returns the new array which may have been relocated.

Returns
The possibly relocated string array.