}
#endif // wxUSE_UNICODE_WCHAR
-#if !wxUSE_UNICODE || wxUSE_UTF8_LOCALE_ONLY
+#if !wxUSE_UNICODE
inline const char* wxCStrData::AsChar() const
{
- return wxStringOperations::AddToIter(m_str->wx_str(), m_offset);
+ return m_str->wx_str() + m_offset;
}
#endif // !wxUSE_UNICODE
+#if wxUSE_UTF8_LOCALE_ONLY
+inline const char* wxCStrData::AsChar() const
+{
+ return wxStringOperations::AddToIter(m_str->wx_str(), m_offset);
+}
+#endif // wxUSE_UTF8_LOCALE_ONLY
+
inline const wxCharBuffer wxCStrData::AsCharBuf() const
{
#if !wxUSE_UNICODE
inline const wxStringCharType *wxCStrData::AsInternal() const
{
+#if wxUSE_UNICODE_UTF8
return wxStringOperations::AddToIter(m_str->wx_str(), m_offset);
+#else
+ return m_str->wx_str() + m_offset;
+#endif
}
inline wxUniChar wxCStrData::operator*() const
{ return i + n; }
static wxStringImpl::const_iterator AddToIter(const wxStringImpl::const_iterator& i, int n)
{ return i + n; }
- static const wxChar* AddToIter(const wxChar *i, int n)
- { return i + n; }
// returns distance of the two iterators in Unicode characters
static int DiffIters(const wxStringImpl::iterator& i1,