Exemplo n.º 1
0
    static ucs4_t const *pick(char const *, wchar_t const *cstr)
    {
        inter_str.clear();
        while(*cstr != 0)
        {
            inter_str.push_back(ucs4_t(*cstr));
            ++cstr;
        }

        return inter_str.c_str();
    }
Exemplo n.º 2
0
void ucs4getline(std::istream& is, ucs4string& ustr)
{
	while (!is.eof())
	{
		ucs4_t ch = ucs4_t('\n');
		is.read(reinterpret_cast<char *>(&ch), 4);

		if (ch == ucs4_t('\n'))
			break;
		ustr.push_back(ch);
	}
}