/home/aaron/olsrd-current/olsrd/src/common/string.h File Reference

#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <ctype.h>
#include "common/common_types.h"
Include dependency graph for string.h:

Go to the source code of this file.

Functions

char *EXPORT() strscpy (char *dest, const char *src, size_t size)
char *EXPORT() strscat (char *dest, const char *src, size_t size)
void EXPORT() str_trim (char **ptr)

Function Documentation

void EXPORT() str_trim ( char **  ptr  ) 

Removes leading and trailing whitespaces from a string. Instead of moving characters around, it will change the pointer to the beginning of the buffer.

Parameters:
ptr pointer to string-pointer

Definition at line 106 of file string.c.

Referenced by netaddr_from_string().

char* EXPORT() strscat ( char *  dest,
const char *  src,
size_t  size 
)

A safer version of strncat that ensures that the target buffer will be null-terminated if its size is greater than zero.

If the target buffer is already full, it will not be changed.

Parameters:
dest target string buffer
src source string buffer
size size of target buffer
Returns:
pointer to target buffer

Definition at line 84 of file string.c.

References strscpy().

Referenced by name_constructor(), name_init(), read_cfg(), read_cfg_cat(), and txtinfo_enable().

Here is the call graph for this function:

char* EXPORT() strscpy ( char *  dest,
const char *  src,
size_t  size 
)
Generated on Sat May 25 06:00:04 2013 for olsrd by  doxygen 1.6.3