| 1659 | |
| 1660 | #ifndef PUGIXML_NO_STL |
| 1661 | PUGI__FN std::string as_utf8_impl(const wchar_t* str, size_t length) |
| 1662 | { |
| 1663 | // first pass: get length in utf8 characters |
| 1664 | size_t size = as_utf8_begin(str, length); |
| 1665 | |
| 1666 | // allocate resulting string |
| 1667 | std::string result; |
| 1668 | result.resize(size); |
| 1669 | |
| 1670 | // second pass: convert to utf8 |
| 1671 | if (size > 0) |
| 1672 | as_utf8_end(&result[0], size, str, length); |
| 1673 | |
| 1674 | return result; |
| 1675 | } |
| 1676 | |
| 1677 | PUGI__FN std::basic_string<wchar_t> as_wide_impl(const char* str, size_t size) |
| 1678 | { |
nothing calls this directly
no test coverage detected