home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
os2prgc.zip
/
str.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-06
|
2KB
|
56 lines
/*****************************************************************************
STR.H -- Sample code for string and character type handling.
Copyright (C) 1993,94,95 by Craig Morrison, All Rights Reserved.
You may use this code in your own projects, regardless of renumeration.
All I ask is that you prominently display the above copyright notice.
Should you need assistance, I can be contacted at the following addresses:
Fidonet: Craig Morrison, 1:201/60@fidonet.org
Internet: cam@wpc.cioe.com
Post: Craig Morrison
1316 Ferry St.
Lafayette, IN 47901-1533
USA
NOTES:
You'll notice the complete lack of any references to run-time
library functions. This was done on purpose so that *I* could
control what happens when a thread gets killed. This package
contains just about everything you'll need to do comm port/file
I/O, string manipulation and ordinal number conversions.
*****************************************************************************/
char cupper(char c);
char clower(char c);
char *supper(char *s);
char *slower(char *s);
unsigned long lenstr(char *s);
char *cpystr(char *dest, char *src);
char *catstr(char *dest, char *src);
char *cpystrn(char *dest, char *src, unsigned long len);
char *catstrn(char *dest, char *src, unsigned long len);
int cmpstr(char *s1, char *s2);
int cmpstri(char *s1, char *s2);
int cmpstrn(char *s1, char *s2, unsigned long len);
int cmpstrni(char *s1, char *s2, unsigned long len);
char *strinstr(char *n, char *h);
char *strinstri(char *n, char *h);
char *charinstr(char *s, char c);
char *rcharinstr(char *s, char c);
void movemem(void *d, void *s, unsigned long l);
void setmem(void *d, char f, unsigned long l);
char *ultoasc(unsigned long num, char *buf);
char *ltoasc(long num, char *buf);
int isalpha(char c);
int isdig(char c);
int iswspace(char c);
long asctol(char *n);
unsigned long asctoul(char *n);
unsigned char *translate(unsigned char *string);
char *GetNextString(char *i, char *o);
int formatStr(char *buf, char *fmt, unsigned long *items);