summaryrefslogtreecommitdiff
path: root/pjlib/include/pj++/string.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'pjlib/include/pj++/string.hpp')
-rw-r--r--pjlib/include/pj++/string.hpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/pjlib/include/pj++/string.hpp b/pjlib/include/pj++/string.hpp
index aa196c8f..1c868986 100644
--- a/pjlib/include/pj++/string.hpp
+++ b/pjlib/include/pj++/string.hpp
@@ -344,6 +344,24 @@ public:
}
//
+ // Assign from char*
+ //
+ Pj_String& operator=(char *s)
+ {
+ set(s);
+ return *this;
+ }
+
+ ///
+ // Assign from another Pj_String
+ //
+ Pj_String& operator=(Pj_String &rhs)
+ {
+ set(rhs);
+ return *this;
+ }
+
+ //
// Find a character in the string.
//
char *strchr(int chr)
@@ -415,10 +433,6 @@ public:
slen = pj_utoa_pad(value, ptr, min_dig, pad);
}
-
-private:
- //Pj_String(const Pj_String &rhs) {}
- void operator=(const Pj_String &rhs) { pj_assert(false); }
};
#endif /* __PJPP_STRING_HPP__ */