updating convenience functions, const

This commit is contained in:
2026-04-29 21:27:38 -04:00
parent 9d54f00969
commit b41a06bda8
6 changed files with 313 additions and 323 deletions

View File

@ -103,28 +103,35 @@ public:
void append(const ams_chartype *other);
void append(const ams_chartype other);
amsstring operator+(const amsstring &other);
const amsstring operator+(const amsstring &other) const;
amsstring operator+(const ams_chartype *other);
const amsstring operator+(const ams_chartype *other) const;
amsstring operator+(const ams_chartype other);
const amsstring operator+(const ams_chartype other) const;
amsstring operator+(const amsstring &other) const;
amsstring operator+(const ams_chartype *other) const;
amsstring operator+(const ams_chartype other) const;
//Find
int find(const amsstring findstr, const int indstart=0, const bool casesens=1) const;
int find(const ams_chartype *findstr, const int indstart=0, const bool casesens=1) const;
int find(const ams_chartype c, const int indstart=0, const bool casesens=1) const;
//todo
// finds first instance starting from length-indstart-1 from the right
int findright(const amsstring findstr, const int indstart=0, const bool casesens=1) const;
int findright(const ams_chartype *findstr, const int indstart=0, const bool casesens=1) const;
int findright(const ams_chartype c, const int indstart=0, const bool casesens=1) const;
//formatted input
int sprintf(int bufflen, const ams_chartype *formatstring, ...);
void tolower();
void toupper();
amsstring lower() const;
amsstring upper() const;
bool isvalidnumber();
double strtonum();
bool isvalidnumber() const;
double strtonum() const;
//updated convenience functions as class members
//todo
};
//needs work