WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
StrLib.h
1#ifndef _WINC_STRLIB
2#define _WINC_STRLIB
3
4namespace WXP {
5 class StrLib {
6 public:
7 static int clear( char *string );
8 static int length( const char *string );
9 static int replace( char *string, char tar, char fill );
10 static int trimWS( char *string );
11 static int stripWS( char *string );
12 static int chop( char *string );
13 static int lowCase( char *string );
14 static int upCase( char *string );
15 static int upCaseFirst( char *string );
16 static int toInt( const char *str, int ind, int len );
17 static int toInt( const char *str, int ind );
18 static int toInt( const char *str );
19 static float toFloat( const char *str, int ind, int len );
20 static float toFloat( const char *str, int ind );
21 static float toFloat( const char *str );
22 static int subString( const char *s1, int ind, int len, char *s2, int len2 );
23 static int splice( char *s1, int len1, int i1, int n, const char *s2 );
24 static const char *getField( const char *str, char delim, int field );
25 static int index( const char *s1, char s2 );
26 static int index( const char *s1, char s2, int num );
27 static int lastIndex( const char *s1, char s2 );
28 static int occurs( const char *s1, char s2 );
29 static bool equal( const char *s1, const char *s2 );
30 static int icmp( const char *s1, const char *s2 );
31 static bool iequal( const char *s1, const char *s2 );
32 static bool contains( const char *s1, const char *s2 );
33 static bool hasToken( const char *s1, char delim, const char *s2 );
34 static int where( const char *s1, const char *s2 );
35 static int icmp( const char *s1, const char *s2, int num );
36 static bool iequal( const char *s1, const char *s2, int num );
37 static bool equal( const char *s1, const char *s2, int num );
38 static bool equal( const char *s1, int num, const char *s2 );
39 static int copy( char *s1, int len1, const char s2 );
40 static int copy( char *s1, int len1, const char *s2 );
41 static int copy( char *s1, int len1, const char *s2, int num );
42 static int bcopy( unsigned char *s1, int len1, const unsigned char *s2, int num );
43 static int append( char *s1, int len1, const char *s2, int num );
44 static int append( char *s1, int len1, const char *s2 );
45 static char *acopy( const char *str );
46 static char *acopy( const char *str, int num );
47 static int printf( char *str, int maxlen, const char *fmt, ... );
48 static int aprintf( char *str, int maxlen, const char *fmt, ... );
49 static char setChar( char *str, int ind, char ch );
50 static char getChar( const char *str, int ind );
51 static bool isNum( const char *string );
52 static bool isNum( const char *string, int len );
53 static int getInt( const char *string );
54 static float getFloat( const char *string );
55 static int clean( char *line );
56 static bool valid( const char *str );
57 static const char *valid( const char *str, const char *def );
58 static bool validData( const char *str );
59 static bool isAlphaNum( const char *str );
60 static bool check( const char *str, const char *pat );
61 static bool match( const char *str, const char *pat );
62 };
63}
64#endif
This class manipulates basic strings (char *)
Definition StrLib.h:5
static int occurs(const char *s1, char s2)
Definition StrLib.cc:332
static int index(const char *s1, char s2)
Definition StrLib.cc:281
static bool contains(const char *s1, const char *s2)
Definition StrLib.cc:431
static bool match(const char *str, const char *pat)
Definition StrLib.cc:886
static int clear(char *string)
Definition StrLib.cc:24
static int lowCase(char *string)
Definition StrLib.cc:110
static char getChar(const char *str, int ind)
Definition StrLib.cc:700
static bool check(const char *str, const char *pat)
Definition StrLib.cc:842
static bool equal(const char *s1, const char *s2)
Definition StrLib.cc:349
static bool isNum(const char *string)
Definition StrLib.cc:714
static int trimWS(char *string)
Definition StrLib.cc:59
static int icmp(const char *s1, const char *s2)
Definition StrLib.cc:361
static int printf(char *str, int maxlen, const char *fmt,...)
Definition StrLib.cc:646
static int where(const char *s1, const char *s2)
Definition StrLib.cc:457
static bool isAlphaNum(const char *str)
Definition StrLib.cc:816
static int subString(const char *s1, int ind, int len, char *s2, int len2)
Definition StrLib.cc:222
static int bcopy(unsigned char *s1, int len1, const unsigned char *s2, int num)
Definition StrLib.cc:558
static int replace(char *string, char tar, char fill)
Definition StrLib.cc:44
static float toFloat(const char *str, int ind, int len)
Definition StrLib.cc:179
static bool iequal(const char *s1, const char *s2)
Definition StrLib.cc:374
static int toInt(const char *str, int ind, int len)
Definition StrLib.cc:138
static int upCase(char *string)
Definition StrLib.cc:95
static const char * getField(const char *str, char delim, int field)
Definition StrLib.cc:262
static int length(const char *string)
Definition StrLib.cc:33
static int lastIndex(const char *s1, char s2)
Definition StrLib.cc:315
static char * acopy(const char *str)
Definition StrLib.cc:606
static int append(char *s1, int len1, const char *s2, int num)
Definition StrLib.cc:573
static int stripWS(char *string)
Definition StrLib.cc:71
static int aprintf(char *str, int maxlen, const char *fmt,...)
Definition StrLib.cc:663
static int splice(char *s1, int len1, int i1, int n, const char *s2)
Definition StrLib.cc:244
static int copy(char *s1, int len1, const char s2)
Definition StrLib.cc:506
static float getFloat(const char *string)
Definition StrLib.cc:758
static int getInt(const char *string)
Definition StrLib.cc:748
static char setChar(char *str, int ind, char ch)
Definition StrLib.cc:683
static bool valid(const char *str)
Definition StrLib.cc:791
All WXP classes fall under the WXP namespace.
Definition Angle.h:4