util::string_util Class Reference

Static utitity functions involving strings. More...

#include <util.h>

List of all members.

Static Public Member Functions

static double decimals (double d)
 Return power(10,number of decimal positions).
static const char * find_sep (const char *start, char sep)
 Find a char separator.
static const char * find_sep2 (const char *start, char sep1, char sep2)
 Find one out of two char separators.
static const char * find_sep3 (const char *start, char sep1, char sep2, char sep3)
 Find one out of three char separators.
static bool is_number (const char *s, double *res)
 True if parsing a number.
static char * remove_spaces (const char *s, const char *e=NULL)
 Remove all spaces in a string.
static char * strcpya (const char *s, size_t n)
 A version of strcpy.
static char * strcpya (const char *s)
 A version of strcpy.
static string tostr (double f)
 Return a string representation of a number.
static char * trim (const char *s)
 Remove left and right spaces.


Detailed Description

Static utitity functions involving strings.

Member Function Documentation

static double util::string_util::decimals ( double  d  )  [inline, static]

Return power(10,number of decimal positions).

static const char* util::string_util::find_sep ( const char *  start,
char  sep 
) [inline, static]

Find a char separator.

static const char* util::string_util::find_sep2 ( const char *  start,
char  sep1,
char  sep2 
) [inline, static]

Find one out of two char separators.

static const char* util::string_util::find_sep3 ( const char *  start,
char  sep1,
char  sep2,
char  sep3 
) [inline, static]

Find one out of three char separators.

static bool util::string_util::is_number ( const char *  s,
double *  res 
) [inline, static]

True if parsing a number.

static char* util::string_util::remove_spaces ( const char *  s,
const char *  e = NULL 
) [inline, static]

Remove all spaces in a string.

static char* util::string_util::strcpya ( const char *  s,
size_t  n 
) [inline, static]

A version of strcpy.

It differs from strncpy in allocating the needed memory.

Parameters:
s source C string.
n max characters.
Returns:
a newly allocated copy of the source string or NULL if allocation failed.

static char* util::string_util::strcpya ( const char *  s  )  [inline, static]

A version of strcpy.

It differs from strncpy in allocating the needed memory.

Parameters:
s source C string.
Returns:
a newly allocated copy of the source string or NULL if allocation failed.

static string util::string_util::tostr ( double  f  )  [inline, static]

Return a string representation of a number.

static char* util::string_util::trim ( const char *  s  )  [inline, static]

Remove left and right spaces.


The documentation for this class was generated from the following file:
Generated on Sun Nov 23 14:52:47 2008 for Typing linear constraints by  doxygen 1.5.4