www.pudn.com > Ftpwork > sfbase.h
/***************************************************************************
sfbase.h - description
-------------------
begin : Sat Sep 28 2002
copyright : (C) 2002 by
email :
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef SFBASE_H
#define SFBASE_H
#include
#define FALSE 0
#define TRUE 1
typedef int BOOL;
class String
{
private:
char * _string; // at begging of the defination
// so than a String can be seen as s char*
public:
String(){_string = "";};
String(const char * string);
~String();
int toInt();
long toLong();
double toDouble();
const char* buffer();
String left(int size);
String right(int size);
String middle(int start, int len);
const int indexof(char ch);
const int indexof(const char* str);
const int indexof(const String & str);
String& upcase();
String& lowcase();
const char operator[](const int index);
const char getAt(const int index);
const char putAt(const int index, const char ch);
String& operator=( const String & str);
String& operator=( const char* str);
String& operator+( const String & str);
String& operator+( const char* str);
String& operator+=(const String & str);
String& operator+=(const char* str);
BOOL operator==(const String& str);
};
#endif