diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/SelectCommunityPostResponse.kt b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/SelectCommunityPostResponse.kt index 1e125f8..ec0cb2d 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/SelectCommunityPostResponse.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/SelectCommunityPostResponse.kt @@ -39,11 +39,12 @@ data class SelectCommunityPostResponse @QueryProjection constructor( if (existOrdered) { content } else { - if (content.length > 15) { + val length = content.codePointCount(0, content.length) + if (length > 15) { val endIndex = content.offsetByCodePoints(0, 15) content.substring(0, endIndex).plus("...") } else { - val endIndex = content.offsetByCodePoints(0, content.length / 2) + val endIndex = content.offsetByCodePoints(0, length / 2) content.substring(0, endIndex).plus("...") } }