<div dir="ltr">Not everybody using C++ uses std:string so I'd prefer if you keep toCString around. <div>Perhaps one thing to consider is whether UTF-8 conversion should be the default instead of Latin1.</div><div><br></div>
<div style>Sander</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 23, 2013 at 1:32 PM, Tsuda Kageyu <span dir="ltr"><<a href="mailto:tsuda.kageyu@gmail.com" target="_blank">tsuda.kageyu@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
I suggest to make some small changes in String API.<br>
<br>
Currently, String class has some methods which convert itself into a<br>
standard C/C++ string, but they are somewhat confusing and inconsistent.<br>
So I'd like to change these methods like this:<br>
<br>
// Current<br>
std::string to8Bit(bool unicode = false) const;<br>
const std::wstring &toWString() const;<br>
const char *toCString(bool unicode = false) const;<br>
<br>
// New<br>
std::string toStdString(Type t = Latin1) const;<br>
const std::wstring &toStdWString() const;<br>
const char *toCString(String::Type t = Latin1) const;<br>
<br>
The actual code is at <a href="https://github.com/taglib/taglib/pull/218" target="_blank">https://github.com/taglib/taglib/pull/218</a><br>
<br>
I think that toCString() is no longer needed and can be substituted by<br>
toStdString() so we can remove it.<br>
_______________________________________________<br>
taglib-devel mailing list<br>
<a href="mailto:taglib-devel@kde.org">taglib-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/taglib-devel" target="_blank">https://mail.kde.org/mailman/listinfo/taglib-devel</a><br>
</blockquote></div><br></div>