Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

strlib.h File Reference

Various string handling routines to complement the C lib. More...

#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Functions

char * strlwc (char *s)
 Convert a string to lowercase.
char * strupc (char *s)
 Convert a string to uppercase.
char * strskp (char *s)
 Skip blanks until the first non-blank character.
char * strcrop (char *s)
 Remove blanks at the end of a string.
char * strstrip (char *s)
 Remove blanks at the beginning and the end of a string.


Detailed Description

Various string handling routines to complement the C lib.

Author:
N. Devillard
Date:
Jan 2001
Version:
Revision
1.3
This modules adds a few complementary string routines usually missing in the standard C library.

Function Documentation

char* strcrop char *  s  ) 
 

Remove blanks at the end of a string.

Parameters:
s String to parse.
Returns:
ptr to statically allocated string.
This function returns a pointer to a statically allocated string, which is identical to the input string, except that all blank characters at the end of the string have been removed. Do not free or modify the returned string! Since the returned string is statically allocated, it will be modified at each function call (not re-entrant).

char* strlwc char *  s  ) 
 

Convert a string to lowercase.

Parameters:
s String to convert.
Returns:
ptr to statically allocated string.
This function returns a pointer to a statically allocated string containing a lowercased version of the input string. Do not free or modify the returned string! Since the returned string is statically allocated, it will be modified at each function call (not re-entrant).

char* strskp char *  s  ) 
 

Skip blanks until the first non-blank character.

Parameters:
s String to parse.
Returns:
Pointer to char inside given string.
This function returns a pointer to the first non-blank character in the given string.

char* strstrip char *  s  ) 
 

Remove blanks at the beginning and the end of a string.

Parameters:
s String to parse.
Returns:
ptr to statically allocated string.
This function returns a pointer to a statically allocated string, which is identical to the input string, except that all blank characters at the end and the beg. of the string have been removed. Do not free or modify the returned string! Since the returned string is statically allocated, it will be modified at each function call (not re-entrant).

char* strupc char *  s  ) 
 

Convert a string to uppercase.

Parameters:
s String to convert.
Returns:
ptr to statically allocated string.
This function returns a pointer to a statically allocated string containing an uppercased version of the input string. Do not free or modify the returned string! Since the returned string is statically allocated, it will be modified at each function call (not re-entrant).


Generated on Tue Oct 25 10:24:14 2005 for CFCFD by  doxygen 1.4.4