git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46491
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#if wxUSE_UNICODE_UTF8
static wxString FromUTF8(const char *utf8)
{
#if wxUSE_UNICODE_UTF8
static wxString FromUTF8(const char *utf8)
{
+ if ( !utf8 )
+ return wxEmptyString;
+
wxASSERT( wxStringOperations::IsValidUtf8String(utf8) );
return FromImpl(wxStringImpl(utf8));
}
static wxString FromUTF8(const char *utf8, size_t len)
{
wxASSERT( wxStringOperations::IsValidUtf8String(utf8) );
return FromImpl(wxStringImpl(utf8));
}
static wxString FromUTF8(const char *utf8, size_t len)
{
+ if ( !utf8 )
+ return wxEmptyString;
+ if ( len == npos )
+ return FromUTF8(utf8);
+
wxASSERT( wxStringOperations::IsValidUtf8String(utf8, len) );
return FromImpl(wxStringImpl(utf8, len));
}
wxASSERT( wxStringOperations::IsValidUtf8String(utf8, len) );
return FromImpl(wxStringImpl(utf8, len));
}