코틀린으로 숫자로 입력된 금액을 한글료 표기해주기 위해 변환하는 함수
ex. 400,500,123 -> 사억 오십만 백이십삼
fun getNumKorString(value: Long): String {
val kor1 = listOf("", "일", "이", "삼", "사","오","육","칠","팔","구")
val kor2 = listOf("", "십", "백", "천")
val kor3 = listOf("", "만", "억", "조", "경")
val strVal = value.toString()
val strLen = strVal.length
var strRet = ""
strVal.forEachIndexed { i, c ->
val n = (c-48).toInt()
val digit = strLen - i - 1
if(n > 0) {
strRet = "$strRet${kor1[n]}${kor2[digit%4]}"
}
if(digit % 4 == 0 && strRet.last() != ' '){
strRet = "$strRet${kor3[digit/4]} "
}
}
return strRet
}