Beispiel #1
0
void Request::add_line_to_multiline_header(const string_view& line,
                                           const string_view& header)
{
    auto non_whitespace_pos = line.find_first_not_of("\t ");
    if (non_whitespace_pos != line.end())
        if (!header.empty())
            headers_[header.str()] += line.substr(non_whitespace_pos).str();
}
Beispiel #2
0
OIIO_NAMESPACE_BEGIN


// boost internally doesn't use MultiByteToWideChar (CP_UTF8,...
// to convert char* to wchar_t* because they do not know the encoding
// See boost/filesystem/path.hpp
// The only correct way to do this is to do the conversion ourselves.

inline filesystem::path
u8path(string_view name)
{
#ifdef _WIN32
    return filesystem::path(Strutil::utf8_to_utf16(name));
#else
    return filesystem::path(name.str());
#endif
}