From c35d2491953b15f44776950a8a9973592e299114 Mon Sep 17 00:00:00 2001 From: Scott Wheeler Date: Sat, 11 Feb 2006 21:18:03 +0000 Subject: [PATCH] Add a wide string export fuction. git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@508477 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- toolkit/tstring.cpp | 5 +++++ toolkit/tstring.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/toolkit/tstring.cpp b/toolkit/tstring.cpp index 1707a947..5d0cf41a 100644 --- a/toolkit/tstring.cpp +++ b/toolkit/tstring.cpp @@ -241,6 +241,11 @@ std::string String::to8Bit(bool unicode) const return s; } +TagLib::wstring String::to32Bit() const +{ + return d->data; +} + const char *String::toCString(bool unicode) const { delete [] d->CString; diff --git a/toolkit/tstring.h b/toolkit/tstring.h index 37edfec2..66e71e91 100644 --- a/toolkit/tstring.h +++ b/toolkit/tstring.h @@ -169,6 +169,11 @@ namespace TagLib { */ std::string to8Bit(bool unicode = false) const; + /*! + * Returns a wstring version of the TagLib string as a wide string. + */ + wstring to32Bit() const; + /*! * Creates and returns a C-String based on the data. This string is still * owned by the String (class) and as such should not be deleted by the user.