#include "strformat.h"#include <string.h>#include <ctype.h>#include <stdlib.h>#include <assert.h>Functions | |
| void | upper (const char lo[], char *up) |
| void | rmsp1 (const char a[], char b[]) |
| void | rmsp (char a[]) |
| void | rmdquote (char a[]) |
| void | rpldquote (char a[], const char r) |
| int | isName (char *n) |
| void | rmtsp (char a[]) |
| void | newline (istream &ins) |
| void | dlc (char a[]) |
| int | getNumber (char *&ptr) |
| int | itoa (unsigned int n, char a[]) |
| int | substr (const char ln[], int s, char sub[]) |
| int | substr (const char ln[], int s, int f, char sub[]) |
| void | firstwd (const char ln[], char sub[], char term) |
| void | append (char *&head, const char *tail, int &len, int &maxlen, int incr) |
| void | append (char *&head, const char *tail, int &len, int &maxlen) |
| void append | ( | char *& | head, | |
| const char * | tail, | |||
| int & | len, | |||
| int & | maxlen | |||
| ) |
| void append | ( | char *& | head, | |
| const char * | tail, | |||
| int & | len, | |||
| int & | maxlen, | |||
| int | incr | |||
| ) |
| void dlc | ( | char | a[] | ) |
| void firstwd | ( | const char | ln[], | |
| char | sub[], | |||
| char | term | |||
| ) |
| int getNumber | ( | char *& | ptr | ) |
///// Conversion to other types such as integer, double
| int isName | ( | char * | n | ) |
References isupper().
| int itoa | ( | unsigned int | n, | |
| char | a[] | |||
| ) |
reverse of atoi convert into an array of char
| void newline | ( | istream & | ins | ) |
| void rmdquote | ( | char | a[] | ) |
| void rmsp1 | ( | const char | a[], | |
| char | b[] | |||
| ) |
References aa.
| void rmtsp | ( | char | a[] | ) |
| void rpldquote | ( | char | a[], | |
| const char | r | |||
| ) |
| int substr | ( | const char | ln[], | |
| int | s, | |||
| int | f, | |||
| char | sub[] | |||
| ) |
picks non-whitespace substring from s to f returns the length of the substring s starting index, f ending index (inclusive)
| int substr | ( | const char | ln[], | |
| int | s, | |||
| char | sub[] | |||
| ) |
Extraction picks substring from index s to a white space of ln, copy to sub sub is set to the substring without any whitespace at beginning or end. If from s to the end is all whitespace, then return 0 and sub is set to empty C string. returns strlen of the substr, 0 if no substr, or substr is empty s is 0-based index
| void upper | ( | const char | lo[], | |
| char * | up | |||
| ) |
References toupper().
1.5.6