Skip to content

Commit f9514d2

Browse files
authored
Merge pull request #9 from b1tflyyyy/dev
implemented >> operator
2 parents 6b33e8b + 421f6ed commit f9514d2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

utf8-string-lib/utf8_string.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@ namespace utf8
3535
// -----------------------------------------------------------------------------------------------------------------
3636
std::istream& operator>>(std::istream& is, ustring& ustr)
3737
{
38-
// TODO: .............................................
39-
throw std::runtime_error("operator >> for utf8::ustring not implemented yet !");
38+
std::basic_string<char> tmp{ };
39+
is >> tmp;
40+
41+
ustr.Copy_With_Metadata_To_Internal_String(tmp.c_str());
42+
return is;
4043
}
4144

4245
// -----------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)