summaryrefslogtreecommitdiff
path: root/src/strings/zstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/strings/zstring.cpp')
-rw-r--r--src/strings/zstring.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/strings/zstring.cpp b/src/strings/zstring.cpp
index e2a763f..01e9c2b 100644
--- a/src/strings/zstring.cpp
+++ b/src/strings/zstring.cpp
@@ -18,15 +18,24 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-#include "xstring.hpp"
+#include <cstdio>
+#include <cstring>
+
+#include "rstring.hpp"
+#include "astring.hpp"
+#include "tstring.hpp"
+#include "literal.hpp"
#include "../poison.hpp"
+
+namespace tmwa
+{
namespace strings
{
ZString::ZString()
{
- *this = ZString("");
+ *this = ZString(""_s);
}
ZString::ZString(const RString& s)
: _b(&*s.begin()), _e(&*s.end()), _base(s.base())
@@ -37,6 +46,9 @@ namespace strings
ZString::ZString(const TString& s)
: _b(&*s.begin()), _e(&*s.end()), _base(s.base())
{}
+ ZString::ZString(const LString& s)
+ : _b(&*s.begin()), _e(&*s.end()), _base(s.base())
+ {}
ZString::ZString(const char *b, const char *e, const RString *base_)
: _b(b), _e(e), _base(base_)
{}
@@ -65,10 +77,5 @@ namespace strings
{
return zs.c_str();
}
-
- __attribute__((format(scanf, 2, 0)))
- int do_vscan(ZString in, const char *fmt, va_list ap)
- {
- return vsscanf(in.c_str(), fmt, ap);
- }
} // namespace strings
+} // namespace tmwa