Added wxString::FromAscii() for char

Used it in protocol.cpp which probably assumes ASCII anyway.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2002-11-03 13:07:41 +00:00
parent 638104abce
commit 0f7730c502
3 changed files with 63 additions and 45 deletions

View File

@@ -755,6 +755,16 @@ wxString wxString::FromAscii(const char *ascii)
return res;
}
wxString wxString::FromAscii(const char ascii)
{
// What do we do with '\0' ?
wxString res;
res += (wchar_t)(unsigned char) ascii;
return res;
}
const wxCharBuffer wxString::ToAscii() const
{
// this will allocate enough space for the terminating NUL too