Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

vul_string.cxx File Reference


Detailed Description

Definition in file vul_string.cxx.

#include "vul_string.h"
#include <vcl_cassert.h>
#include <vcl_cstdlib.h>
#include <vcl_cstring.h>
#include <vcl_cctype.h>
#include <vcl_algorithm.h>

Go to the source code of this file.

Defines

#define END_OF_STRING   (0)

Functions

char * vul_string_c_upcase (char *s)
 Converts all alphabetical characters to uppercase.
char * vul_string_c_downcase (char *s)
 Converts all alphabetical characters to lowercase.
char * vul_string_c_capitalize (char *s)
 Capitalizes all words in a string.
char * vul_string_c_trim (char *str, const char *rem)
 Removes any occurrences of rem from str, and returns the modified string.
char * vul_string_c_left_trim (char *str, const char *rem)
 Removes any prefix occurrence of rem from str and returns modified string.
char * vul_string_c_right_trim (char *str, const char *rem)
 Removes any suffix occurrence of rem from str and returns modified string.
char * vul_string_c_reverse (char *c)
 Reverses the order of the characters in string.
vcl_string & vul_string_reverse (vcl_string &s)
 Reverses the order of the characters in string.
vcl_string & vul_string_upcase (vcl_string &s)
 Converts all alphabetical characters to uppercase.
vcl_string & vul_string_downcase (vcl_string &s)
 Converts all alphabetical characters to lowercase.
vcl_string & vul_string_capitalize (vcl_string &s)
 Capitalizes all words in string.
vcl_string & vul_string_trim (vcl_string &sr, const char *rem)
 Removes any occurrences of rem from str and returns modified string.
vcl_string & vul_string_left_trim (vcl_string &sr, const char *rem)
 Removes any prefix occurrence of rem from str and returns modified string.
vcl_string & vul_string_right_trim (vcl_string &sr, const char *rem)
 Removes any suffix occurrence of rem from str and returns modified string.
int vul_string_atoi (vcl_string const &s)
 Reads an integer from a string.
double vul_string_atof (vcl_string const &s)
 Reads an double from a string.
bool vul_string_to_bool (const vcl_string &str)
 Convert a string to a boolean.
bool vul_string_expand_var (vcl_string &str)
 Expand any environment variables in the string.


Define Documentation

#define END_OF_STRING   (0)
 

Definition at line 13 of file vul_string.cxx.


Function Documentation

double vul_string_atof vcl_string const &  s  ) 
 

Reads an double from a string.

Definition at line 214 of file vul_string.cxx.

int vul_string_atoi vcl_string const &  s  ) 
 

Reads an integer from a string.

Definition at line 209 of file vul_string.cxx.

char* vul_string_c_capitalize char *   ) 
 

Capitalizes all words in a string.

A word is defined as a sequence of characters separated by non-alphanumerics.

Definition at line 42 of file vul_string.cxx.

char* vul_string_c_downcase char *  s  ) 
 

Converts all alphabetical characters to lowercase.

Definition at line 29 of file vul_string.cxx.

char* vul_string_c_left_trim char *  str,
const char *  rem
 

Removes any prefix occurrence of rem from str and returns modified string.

Definition at line 74 of file vul_string.cxx.

char* vul_string_c_reverse char *  c  ) 
 

Reverses the order of the characters in string.

Definition at line 109 of file vul_string.cxx.

char* vul_string_c_right_trim char *  str,
const char *  rem
 

Removes any suffix occurrence of rem from str and returns modified string.

Definition at line 93 of file vul_string.cxx.

char* vul_string_c_trim char *  str,
const char *  rem
 

Removes any occurrences of rem from str, and returns the modified string.

Definition at line 56 of file vul_string.cxx.

char* vul_string_c_upcase char *  s  ) 
 

Converts all alphabetical characters to uppercase.

Definition at line 17 of file vul_string.cxx.

vcl_string& vul_string_capitalize vcl_string &  s  ) 
 

Capitalizes all words in string.

Definition at line 156 of file vul_string.cxx.

vcl_string& vul_string_downcase vcl_string &  s  ) 
 

Converts all alphabetical characters to lowercase.

Definition at line 148 of file vul_string.cxx.

bool vul_string_expand_var vcl_string &  str  ) 
 

Expand any environment variables in the string.

   Expands "foo\f$VARfoo" to "foobarfoo" when \f$VAR=bar. If
   both \f$VAR and \f$VARfoo exists, an arbitrary choice will
   be made of which variable to use. This problem can
   be avoided by using the syntax "foo\f${VAR}foo." "\f$(VAR)"
   and "$[VAR]" can also be used.
   There are no inbuilt variables like in shell scripting, and
   variable names cannot contain whitespace or "\f$"s. "\f$$"
   can be used to insert a literal "$" in to the output.
   
Returns:
false if a matching variable could not be found.

Definition at line 263 of file vul_string.cxx.

vcl_string& vul_string_left_trim vcl_string &  sr,
const char *  rem
 

Removes any prefix occurrence of rem from str and returns modified string.

Definition at line 190 of file vul_string.cxx.

vcl_string& vul_string_reverse vcl_string &  s  ) 
 

Reverses the order of the characters in string.

Definition at line 125 of file vul_string.cxx.

vcl_string& vul_string_right_trim vcl_string &  sr,
const char *  rem
 

Removes any suffix occurrence of rem from str and returns modified string.

Definition at line 200 of file vul_string.cxx.

bool vul_string_to_bool const vcl_string &  str  ) 
 

Convert a string to a boolean.

Looks for On, true, yes, 1 to mean true. everything else is false. It ignores leading and trailing whitespace and capitalisation.

Definition at line 234 of file vul_string.cxx.

vcl_string& vul_string_trim vcl_string &  sr,
const char *  rem
 

Removes any occurrences of rem from str and returns modified string.

Definition at line 176 of file vul_string.cxx.

vcl_string& vul_string_upcase vcl_string &  s  ) 
 

Converts all alphabetical characters to uppercase.

Definition at line 140 of file vul_string.cxx.


Generated on Thu Jan 10 14:41:00 2008 for core/vul by  doxygen 1.4.4