Skip to content

Instantly share code, notes, and snippets.

@synchrok
Last active November 5, 2023 11:16
Show Gist options
  • Save synchrok/5116481 to your computer and use it in GitHub Desktop.
Save synchrok/5116481 to your computer and use it in GitHub Desktop.
eulrlera (을를이가): 문자열 뒤에 붙을 말이 을(이/은)인지 를(가/는)인지 알려주는 함수
public class Utility {
public static boolean eulrlega(String word) {
char last = word.charAt(word.length()-1);
if(last < 0xAC00)
return true;
last -= 0xAC00;
char jong = (char) ((last % 28) + 0x11a7);
return (jong != 4519);
}
public static String getEulrl(String word) {
return eulrlega(word)? "을" : "를";
}
public static String getEga(String word) {
return eulrlega(word)? "이" : "가";
}
public static String getEunnn(String word) {
return eulrlega(word)? "은" : "는";
}
}
@synchrok
Copy link
Author

eulrlera (을를이가)
:String 뒤에 붙을 말이 을(이/은)인지 를(가/는)인지 알려주는 함수
@param String
@return true(을, 이, 은) / false(를, 가, 는)

@seungbeomi
Copy link

찾고있었는데 좋은정보 감사합니다.

@spielbug
Copy link

감사합니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment