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 6056e10..1e125f8 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 @@ -40,9 +40,11 @@ data class SelectCommunityPostResponse @QueryProjection constructor( content } else { if (content.length > 15) { - content.substring(0, 15).plus("...") + val endIndex = content.offsetByCodePoints(0, 15) + content.substring(0, endIndex).plus("...") } else { - content.substring(0, content.length / 2).plus("...") + val endIndex = content.offsetByCodePoints(0, content.length / 2) + content.substring(0, endIndex).plus("...") } } } else {