#ifndef _MSTR_
#define _MSTR_

#include "sys/sys"

class Mstr: public string {
public:
    Mstr(string s): string(s) {}
    Mstr(char const *s): string(s) {}
    Mstr(int i) {
	ostringstream o;
	o << i;
	*this = o.str();
    }
    Mstr const &operator+ (int i) {
	ostringstream o;
	o << i;
	*this += o.str();
	return *this;
    }
    Mstr const &operator+ (unsigned i) {
	ostringstream o;
	o << i;
	*this += o.str();
	return *this;
    }
    Mstr const &operator+ (time_t i) {
	ostringstream o;
	o << i;
	*this += o.str();
	return *this;
    }
    Mstr const &operator+ (double i) {
	ostringstream o;
	o << i;
	*this += o.str();
	return *this;
    }
    Mstr const &operator+(string const &s) {
	*this += s;
	return *this;
    }
    Mstr const &operator+(void const *p) {
	ostringstream o;
	o << p;
	*this += o.str();
	return *this;
    }
    Mstr const &operator+(rlim_t r) {
	ostringstream o;
	o << r;
	*this += o.str();
	return *this;
    }
};

#endif
