MCPcopy Create free account
hub / github.com/ablab/spades / convert

Method convert

ext/src/cppformat/format.cc:448–458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

446}
447
448int fmt::internal::UTF16ToUTF8::convert(fmt::WStringRef s) {
449 int length = WideCharToMultiByte(CP_UTF8, 0, s.c_str(), -1, 0, 0, 0, 0);
450 if (length == 0)
451 return GetLastError();
452 buffer_.resize(length);
453 length = WideCharToMultiByte(
454 CP_UTF8, 0, s.c_str(), -1, &buffer_[0], length, 0, 0);
455 if (length == 0)
456 return GetLastError();
457 return 0;
458}
459
460void fmt::WindowsError::init(
461 int error_code, StringRef format_str, ArgList args) {

Callers 1

FMT_NOEXCEPTFunction · 0.45

Calls 2

c_strMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected