11#define DOUBLE_PRECISION 100
22 void copyFrom(
const String& other);
54 void read(std::istream& istr);
56 void write(std::ostream& ostr)
const;
A dynamically-allocated C-style string with extra features.
Definition: String.h:17
friend std::istream & operator>>(std::istream &istr, String &str)
Reads String from stream with >> operator.
Definition: String.cpp:177
const char * get_cstr() const
Returns internal C-style string.
Definition: String.cpp:35
int compare(const String &other) const
Compares two strings.
Definition: String.cpp:167
char & operator[](unsigned index)
Returns a character reference (from the underlying C-style string) at the given index.
Definition: String.cpp:43
String & operator+=(const char *str)
Appends a C-style string.
Definition: String.cpp:49
unsigned get_length() const
Returns number of characters in string.
Definition: String.cpp:39
void write(std::ostream &ostr) const
Writes String to stream.
Definition: String.cpp:159
friend std::ostream & operator<<(std::ostream &ostr, const String &str)
Writes String to stream with << operator.
Definition: String.cpp:189
void read(std::istream &istr)
Reads String from stream.
Definition: String.cpp:146