home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftptest.leeds.ac.uk
/
2015.02.ftptest.leeds.ac.uk.tar
/
ftptest.leeds.ac.uk
/
bionet
/
CAE-GROUP
/
SCL-WIN3x
/
SCL.EXE
/
SCL_STRI.H
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-06
|
2KB
|
77 lines
#ifndef _SCL_STRING_H
#define _SCL_STRING_H
/*
* NIST Utils Class Library
* clutils/scl_string.h
* February, 1994
* K. C. Morris
* David Sauder
* Development of this software was funded by the United States Government,
* and is not subject to copyright.
*/
/* $Id: scl_string.h,v 2.0.1.2 1994/04/05 16:44:13 sauderd Exp $ */
/* point of contact for bug reports */
#define _POC_ " report problem to dp1-bugs@cme.nist.gov "
//#include <std.h> // not found in CenterLine C++
#ifdef __OBJECTCENTER__
// this file is not in gnu C++ but it doesn't seem to be needed.
#include <stdarg.h>
#endif
#include <iostream.h>
#include <string.h>
/******************************************************************
** Class: SCLstring
** Description: implements a few basic string handling functions -
** hopefully will be replaced by a standard clas
** Status: 26-Jan-1994 kc
******************************************************************/
class SCLstring {
protected:
char * _strBuf; // initially empty
int _strBufSize; // size of buffer
int _max_len; // should be const, but some db\'s don\'t handle that
int newBufSize (int len) const;
public:
int is_null() const;
int set_null() ;
int StrBufSize() const;
int Length() const;
int MaxLength() const { return _max_len; }
const char * chars () const
{ return _strBuf ? _strBuf : ""; }
const char * rep() const
{ return _strBuf; }
// operators
SCLstring& operator= (const char*); // must be NULL terminated string
SCLstring& operator= (char* s) // must be NULL terminated string
{ operator= ((const char *)s); return *this; }
operator const char * () const;
int operator== (const char*) const;
SCLstring& Append (const char *);
SCLstring& Append (const char);
SCLstring& Append (const long int);
SCLstring& Append (const double, const int precision =15);
SCLstring& Prepend (const char *);
//constructor(s) & destructor
SCLstring (const char * str = 0, int max =0);
SCLstring (const SCLstring& s);
~SCLstring ();
};
#endif //_SCL_STRING_H