Java tutorial
//package com.java2s; public class Main { public static final String getKorean(String str) { String korean = ""; char syllable; for (int i = 0; i < str.length(); i++) { syllable = str.charAt(i); if (Character.getType(syllable) == 5) korean += syllable; else return korean; } return korean; } }