strformat.h

Go to the documentation of this file.
00001 #ifndef STRFORMAT_H
00002 #define STRFORMAT_H
00003 #include <iostream.h>
00004 //this file is upcase.h 
00005 
00006 void upper(const char lo[], char *up);
00007 void rmsp(char a[]);
00008 //removes extra white-char (space, \t, and \n) from the string, so 
00009 //that only one space is left to separate words
00010 
00011 void rmsp(const char a[], char b[]);
00012 //overloaded version.   input string a, output string b
00013 void rmdquote(char a[]); //removes double quote
00014 void rpldquote(char a[], const char r); //replace double quote with r
00015 
00016 int isName(char *n);
00017 //return 1 if the string is a scientific organism name such as Homo sapiens
00018 void rmtsp(char a[]);
00019 //remove trailing white characters such as space and \n
00020 
00021 void newline(istream &ins); //removes remaining character from input stream
00022 void dlc(char a[]); //deltes the last character
00023 
00024 int getNumber(char *&ptr);  
00025 //get number from a pointer that is on the first digit of a string.  
00026 //The pointer will be advanced to the firs non-digit character
00027 
00028 int itoa(unsigned int n, char a[]);
00029 //return the number of digits:
00030 
00031 int substr(const char ln[], int s, char sub[]);
00032 //picks substring from index s to a white space of ln, copy to sub
00033 //returns strlen of the substr, 0 if no substr
00034 int substr(const char ln[], int s, int f, char sub[]);
00035 //returns substring length  
00036 void firstwd(const char ln[], char sub[], char term=' ');
00037 
00038 void append(char *&head, const char *tail, int &len, int &maxlen, 
00039                 int incr);
00040 //carefull, these are managed by new allocation
00041 //incr is the size increment, should be larger than strlen(tail)
00042 //if not the function will increase it automatically
00043 void append(char *&head, const char *tail, int &len, int &maxlen);
00044 
00045 
00046 
00047 #endif

Generated on Wed Aug 10 11:56:51 2011 for Softwares from Orpara by  doxygen 1.5.6