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.