libmove3d  3.13.0
Functions
/home/slemaign/softs-local/BioMove3D-git/util/string_util.c File Reference

String utilities. More...

#include "Util-pkg.h"

Functions

char * strdup (const char *str)
int fixed_str_copy (char *dest, const char *src, int *indice, int size)
 Concat a string to a fixed sized string.
char * dyna_str_dup (const char *data)
 Copy and allocate the memory for a string.
void dyna_str_free (char *data)
 Release the memory owned by a dynamic string.

Detailed Description

String utilities.

These functions are used to manage strings.


Function Documentation

char* dyna_str_dup ( const char *  data)

Copy and allocate the memory for a string.

Parameters:
data,:the string that must be copied
Returns:
The new string.
void dyna_str_free ( char *  data)

Release the memory owned by a dynamic string.

Parameters:
data,:the string.
Warning:
This function assumes that the memory allocated is given by the size of the string.
int fixed_str_copy ( char *  dest,
const char *  src,
int *  indice,
int  size 
)

Concat a string to a fixed sized string.

Parameters:
dest,:the string to copy into
src,:string that must be copied
indice,:where the string must be copied
size,:the size of dest
Return values:
indice,:the lenght of the string
Returns:
FALSE if src could not be copied
Note:
if (* indice) == 0 then this function is similar to strncpy
if (* indice) == length of dest then this function is similar to strlcat
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines