Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
stringex.h
Upload User: tt_chan
Upload Date: 2009-12-03
Package Size: 4523k
Code Size: 1k
Category:
Game Server Simulator
Development Platform:
Visual C++
- #ifndef __ORZ_STRING__
- #define __ORZ_STRING__
- #include <string.h>
- #include <ctype.h>
- /*
- string support class (binary string)
- */
- class bstr
- {
- public:
- char *ptr;
- int size;
- public:
- bstr();
- bstr( bstr &str );
- bstr( char *str );
- virtual ~bstr();
- bool alloc ( int len );
- bool expand( int len );
- bool assign( char *str, int len );
- bool assign( char *str );
- void cleanup();
- bool isassign();
- int length();
- operator char * () { return ptr; }
- operator const char * const () { return (const char *) ptr; }
- char * operator = ( char *str );
- char * operator = ( bstr &str );
- char * operator = ( int num );
- bool operator == ( char *str );
- bool operator != ( char *str );
- bstr & operator += ( char *str );
- bstr & operator += ( int num );
- friend bstr operator + ( bstr &str1, bstr &str2 );
- friend bstr operator + ( bstr &str1, char *str2 );
- friend bstr operator + ( char *str1, bstr &str2 );
- };
- /*
- C runtime function plus++
- */
- char * _memstr( char *buf, int buf_len, char *str );
- char * _memistr( char *buf, int buf_len, char *str );
- /*
- string manipulation
- */
- bool _isspace( char c );
- int _ltrim( char *str );
- int _rtrim( char *str );
- int _trim( char *str );
- int _linecopy( char *str, char *buf );
- int _linecopy( bstr *str, char *buf );
- bool _pickstring( char *str, char sep, int index, char *buf, int buf_len );
- #endif