- { return SubstrBufFromWC(str, n == npos ? wxWcslen(str) : n); }
- static wxWCharBuffer ImplStr(const char* str)
- { return ConvertStr(str, npos, wxConvLibc).data; }
- static SubstrBufFromMB ImplStr(const char* str, size_t n)
- { return ConvertStr(str, n, wxConvLibc); }
+ { return SubstrBufFromWC(str, (str && n == npos) ? wxWcslen(str) : n); }
+ static wxWCharBuffer ImplStr(const char* str,
+ const wxMBConv& conv = wxConvLibc)
+ { return ConvertStr(str, npos, conv).data; }
+ static SubstrBufFromMB ImplStr(const char* str, size_t n,
+ const wxMBConv& conv = wxConvLibc)
+ { return ConvertStr(str, n, conv); }