WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
String.h
1#ifndef _WINC_STRING
2#define _WINC_STRING
3
4namespace WXP {
5 class String {
6 int len;
7 int maxlen;
8 char *data;
9 char *ptr;
10
11 public:
12 int init();
13 int init( int length );
14 String( int length );
15 String();
16 String( const char *str );
17 String( const String &string );
18 String operator=( const String &string );
19 ~String();
20 int set( const char *str );
21 int set( const String &string );
22 int reset();
23 bool valid();
24 bool isAlphaNum();
25 const char *get();
26 const char *get( int ind );
27 char getChar( int ind );
28 int length();
29 int maxLength();
30 int clear();
31 int resize( int length );
32 int resize();
33 int rewind();
35 inline const char *getPtr(){ return ptr; };
36 int scanf( const char *mess, ... );
37 int scanp( const char *mess, ... );
38 int printf( const char *mess, ... );
39 int aprintf( const char *mess, ... );
40 int replace( char tar, char rep );
41 int trimWS();
42 int stripWS();
43 int chop();
44 int upCase();
45 int lowCase();
46 int index( char ch );
47 bool equal( const char *str );
48 bool equal( const char *str, int num );
49 bool iequal( const char *str );
50 bool iequal( const char *str, int num );
51 bool contains( const char *str );
52 int occurs( char ch );
53 int copy( const char *str );
54 int copy( String &str );
55 int copy( const char *str, int num );
56 int append( const char *str );
57 int append( String &str );
58 int append( const char *str, int num );
59 int append( char str );
60 int trunc( int ind );
61 int print();
62 };
63}
64#endif
This is a variable length string class.
Definition String.h:5
int chop()
Definition String.cc:425
int trunc(int ind)
Definition String.cc:696
int maxLength()
Definition String.cc:174
int print()
Definition String.cc:708
int printf(const char *mess,...)
Definition String.cc:339
bool contains(const char *str)
Definition String.cc:530
bool valid()
Definition String.cc:150
int scanf(const char *mess,...)
Definition String.cc:224
int stripWS()
Definition String.cc:404
int lowCase()
Definition String.cc:448
int resize()
Definition String.cc:206
const char * get()
Definition String.cc:120
int init()
Definition String.cc:56
char getChar(int ind)
Definition String.cc:139
String()
Definition String.cc:28
int scanp(const char *mess,...)
Definition String.cc:241
String operator=(const String &string)
Definition String.cc:78
bool equal(const char *str)
Definition String.cc:475
int aprintf(const char *mess,...)
Definition String.cc:357
int copy(const char *str)
Definition String.cc:555
int index(char ch)
Definition String.cc:462
int replace(char tar, char rep)
Definition String.cc:376
int reset()
Definition String.cc:111
bool iequal(const char *str)
Definition String.cc:487
int rewind()
Definition String.cc:213
~String()
Definition String.cc:88
int clear()
Definition String.cc:181
int append(const char *str)
Definition String.cc:628
int occurs(char ch)
Definition String.cc:541
int trimWS()
Definition String.cc:388
int upCase()
Definition String.cc:436
int set(const char *str)
Definition String.cc:96
const char * getPtr()
Definition String.h:35
int length()
Definition String.cc:166
All WXP classes fall under the WXP namespace.
Definition Angle.h:4