ubit::UCstr Struct Reference

useful functions for C strings. More...

#include <ustr.hpp>

List of all members.

Static Public Member Functions

static char * dup (const char *s)
 creates a duplicate of s.
static char * dup (const char *s1, const char *s2)
 creates a duplicate of s1 + s2.
static char * dup (const char *s1, char sep, const char *s2)
 creates a duplicate of s1 + sep + s2.
static int strcasecmp (const char *s1, const char *s2)
 compares two strings, ignoring the case.
static int strncasecmp (const char *s1, const char *s2, unsigned int n)
 compares the Nth first characters of two strings, ignoring the case.
static const char * suffix (const char *pathname)
 finds the suffix in a pathname.
static void parsePath (char *path_name, int path_len, char *&dir_name, int &dir_len, char *&base_name, int &base_len, char *&suffix, int &suffix_len)
 transforms a path name into its dirname, basename and suffix components.


Detailed Description

useful functions for C strings.

these functions may already exist on some OS.


Member Function Documentation

void ubit::UCstr::parsePath ( char *  path_name,
int  path_len,
char *&  dir_name,
int &  dir_len,
char *&  base_name,
int &  base_len,
char *&  suffix,
int &  suffix_len 
) [static]

transforms a path name into its dirname, basename and suffix components.

the returned pointers points inside the path name and should not be freed.

const char * ubit::UCstr::suffix ( const char *  pathname  )  [static]

finds the suffix in a pathname.

the returned value is null or points inside the original string (its is not duplicated and thus, can't be freed)


The documentation for this struct was generated from the following files:
Generated on Mon Jan 29 00:20:56 2007 for Ubit by  doxygen 1.4.7