home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1996 November
/
VPR9611B.ISO
/
vabasic
/
ntclnt.exe
/
DISK8
/
data.8
/
datab
/
INCLUDE
/
STRUTIL.H
< prev
next >
Wrap
C/C++ Source or Header
|
1996-07-29
|
4KB
|
95 lines
/*--------------------------------------------------------------
// $Source: /rcs/crcs/general/strutil.h,v $
// Checked in by: $Author: marc $
// $Date: 1996/06/10 18:01:11 $ $Revision: 1.18 $
//--------------------------------------------------------------
// Copyright(c) 1992, Visual Edge Software Ltd.
//
// ALL RIGHTS RESERVED. This notice is intended as a precaution
// against inadvertent publication, and shall not be deemed to
// consitute an acknowledgment that publication has occurred
// nor to imply any waiver of confidentiality. The year included
// in the notice is the year of the creation of the work.
//--------------------------------------------------------------
// DESCRIPTION:
// This file declares string utility functions
//------------------------------------------------------------*/
#ifndef STRUTIL_H
#define STRUTIL_H
#include <os.h>
#include <string.h>
#include <visedge.h>
#ifdef __cplusplus
extern "C" {
#endif
/* The following functions were replaced by an equivalent but faster macro: */
#define VStrIEqual(s1,s2) (VeStrICmp(s1,s2) == 0)
#define VStrEqual(s1,s2) (VeStrCmp(s1,s2) == 0)
/* used for float format conversion */
typedef enum {
INTL_FLOAT=0,
ENGLISH_FLOAT
} VTFloatFormat;
VFUNCDECL(int) VeStrCharLen (const char*);
VFUNCDECL(int) VeStrLen (const char*);
VFUNCDECL(int) VeStrNIEqual (const char*, const char*, unsigned int);
VFUNCDECL(int) VeStrCmp (const char*, const char*);
VFUNCDECL(int) VeStrICmp (const char*, const char*);
VFUNCDECL(int) VeStrColl (const char*, const char*);
VFUNCDECL(int) VeMemCmp (const void*, const void*, unsigned int);
VFUNCDECL(int) VeMemICmp (const void*, const void*, unsigned int);
/* Equivalent to strdup. */
VFUNCDECL(char*) VeStrCopy (const char*);
VFUNCDECL(char*) VeAsciiToPointer (char *p, void **aRetPtr);
VFUNCDECL(char*) VeAsciiToLongHex (char *p, unsigned long *aRet);
VFUNCDECL(char*) VeStrChr (const char *src, const char *key);
VFUNCDECL(char*) VeStrRChr (const char *src, const char *key);
VFUNCDECL(char*) VeStrIChr (const char *s1, const char *s2);
VFUNCDECL(char*) VeStrStr (const char *s1, const char *s2);
VFUNCDECL(char*) VeStrIStr (const char *s1, const char *s2);
VFUNCDECL(char*) VeStrTok (char *str, const char *chars);
VFUNCDECL(char*) VeStrPBrk (const char *str, const char *chars);
VFUNCDECL(char*) VeStrGet (const char *str, unsigned int index);
VFUNCDECL(void *) VePatternMemSet(void *pArea, void *pPattern,
unsigned long PatternLength,
unsigned long AreaLength);
/*
* - Faster case insensitive compare functions. These functions assumes that
* the 2nd parameter (strcst) is a constant constaining no upper case letters.
*/
VFUNCDECL(int) VeStrCstNIEqual (const char* var, const char* cst, unsigned);
VFUNCDECL(int) VeStrCstIEqual (const char* var, const char* cst);
VFUNCDECL(int) VeStrCstICmp (const char* var, const char* cst);
VFUNCDECL(int) VeMemCstICmp (const void* var, const void* cst, unsigned);
VFUNCDECL(char*) VeStrCstIStr (const char *s1, const char *s2);
VFUNCDECL(char*) VeStrCstIChr (const char *s1, const char *s2);
VFUNCDECL(char*) VeBinaryStrStr (const char*, const char*, long size);
VFUNCDECL(char*) VeStripLeadingAndTrailingSpaces (char *str);
VFUNCDECL(int) VeStrCharIndex (const char *str, unsigned int index);
VFUNCDECL(bool_t) VeStrFormatFloat (const char *pFloat,
char *pBuffer,
VTFloatFormat typeConv);
#ifdef __cplusplus
}
VCLASS VeString;
VFUNCDECL(VeString) VeReplaceNonPrintChars(char *aStr,const char *aRepChar);
#endif
#endif /* STRUTIL_H */