Qualia  0.2
string_utils.h File Reference
#include <qualia/core/common.h>
#include <string.h>
Include dependency graph for string_utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

char * strBaseName (char *filename)
 
char * strRemoveSuffix (char *filename, char c='.')
 
char * strConcat (int n,...)
 

Function Documentation

char* strBaseName ( char *  filename)

Some simple functions for string operations.

Author
Samy Bengio (bengi.nosp@m.o@id.nosp@m.iap.c.nosp@m.h)
Johnny Mariethoz (Johnn.nosp@m.y.Ma.nosp@m.rieth.nosp@m.oz@i.nosp@m.diap..nosp@m.ch)
Ronan Collobert (collo.nosp@m.ber@.nosp@m.idiap.nosp@m..ch)Returns the name of a file without leading pathname. (It's not a new string, but a pointer in the given string)
char* strConcat ( int  n,
  ... 
)

Returns the concatenation #n# strings. The strings are the parameters given after #n#; You have to free the memory!

char* strRemoveSuffix ( char *  filename,
char  c = '.' 
)

Returns a fresh copy of the name of a file without suffix. (Trailing chars after c) You have to free the memory!