From e87f19a8df7e7f418a5e523292db25aa64031433 Mon Sep 17 00:00:00 2001 From: Klaus Date: Mon, 17 Jun 2024 23:02:20 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BB=A4=EB=AE=A4=EB=8B=88=ED=8B=B0=20?= =?UTF-8?q?=EA=B2=8C=EC=8B=9C=EB=AC=BC=20-=20=EA=B8=80=EC=9E=90=20?= =?UTF-8?q?=EC=88=98=20=EA=B3=84=EC=82=B0=EC=8B=9C=20codePointCount?= =?UTF-8?q?=EC=9D=84=20=EC=82=AC=EC=9A=A9=ED=95=98=EC=97=AC=20=EA=B8=80?= =?UTF-8?q?=EC=9E=90=EC=88=98=EB=A5=BC=20=EC=9C=A0=EB=8B=88=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EA=B8=B0=EC=A4=80=EC=9C=BC=EB=A1=9C=20=EA=B3=84?= =?UTF-8?q?=EC=82=B0=20=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../profile/creatorCommunity/SelectCommunityPostResponse.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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("...") } }