コード例 #1
0
ファイル: MadEditSearch.cpp プロジェクト: elleryq/madedit
    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();
    }
コード例 #2
0
ファイル: ucs4stream.cpp プロジェクト: hltj/toy_segmentation
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);
	}
}