Skip to content

Instantly share code, notes, and snippets.

@sat0b
Created June 14, 2017 11:09
Show Gist options
  • Select an option

  • Save sat0b/ea615423a5fd176366d1ab312050f33b to your computer and use it in GitHub Desktop.

Select an option

Save sat0b/ea615423a5fd176366d1ab312050f33b to your computer and use it in GitHub Desktop.
日本語を逆順に表示
#include <string>
#include <codecvt>
#include <iostream>
using namespace std;
int main() {
wstring_convert<codecvt_utf8<char32_t>, char32_t> cv;
u32string s = U"あいうえお";
for (auto v : s)
cout << cv.to_bytes(v) << endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment