STL

포스트: 5|조회수: 0|ORGANIZATION
Items

Posts

5 posts

[C++11] 표준 라이브러리만을 이용한 std::string 과 std::wstring 간의 변환방법

가끔 유니코드 문자열을 인자로 받는 함수에 멀티바이트로 저장한 문자열을 넘겨줘야 할 때, 또는 그 반대의 경우에 유용한 함수이다. Locale은 원하는 국가코드를 집어넣으면 된다. #include #include #include inline std::wstring s_to_ws(const std::string& str, std::locale Loc = std::locale("ko")){using conv_Ty = std::codecvt_utf8_utf16;return std::wstring_convert { &std::use_facet

Cards!!!

Cards!!!

thru and thru |2012년 10월 19일

이렇게 훈훈한 해외업체 담당자의 메일은 처음받아 본다.