summaryrefslogtreecommitdiff
path: root/otk/ustring.hh
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-01-13 01:08:54 +0000
committerDana Jansens <danakj@orodu.net>2003-01-13 01:08:54 +0000
commit8b73f6f02517e717842d122d82e1eb08cda95e19 (patch)
tree33fd49f2649b3d6e530d7c904913d75f58f436d4 /otk/ustring.hh
parentecfac5f20c72647b4865a14ccffc307c2b116319 (diff)
begin conversion to ustring. add some more members.
Diffstat (limited to 'otk/ustring.hh')
-rw-r--r--otk/ustring.hh28
1 files changed, 22 insertions, 6 deletions
diff --git a/otk/ustring.hh b/otk/ustring.hh
index 5d011cfc..03f893d3 100644
--- a/otk/ustring.hh
+++ b/otk/ustring.hh
@@ -20,6 +20,14 @@ extern "C" {
namespace otk {
+#ifdef HAVE_STDINT_H
+typedef uint32_t unichar;
+#else
+typedef u_int32_t unichar;
+#endif
+
+#ifndef DOXYGEN_IGNORE
+
//! The number of bytes to skip to find the next character in the string
const char g_utf8_skip[256] = {
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
@@ -32,12 +40,6 @@ const char g_utf8_skip[256] = {
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,1,1
};
-#ifdef HAVE_STDINT_H
-typedef uint32_t unichar;
-#else
-typedef u_int32_t unichar;
-#endif
-
//! The iterator type for ustring
/*!
Note this is not a random access iterator but a bidirectional one, since all
@@ -102,6 +104,8 @@ private:
T _pos;
};
+#endif // DOXYGEN_IGNORE
+
//! This class provides a simple wrapper to a std::string that is encoded as
//! UTF-8.
/*!
@@ -140,6 +144,18 @@ public:
ustring(const std::string& src);
ustring::ustring(const char* src);
+ // sizes
+
+ ustring::size_type size() const;
+ ustring::size_type length() const;
+ ustring::size_type bytes() const;
+ ustring::size_type capacity() const;
+ ustring::size_type max_size() const;
+
+ // internal data
+
+ const char* data() const;
+ const char* c_str() const;
};