truncate texts to maximum allowed length
parent
5dded26b
No related branches found
No related tags found
Showing
- briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/conversation/ConversationViewModel.kt 3 additions, 1 deletion...oject/briar/desktop/conversation/ConversationViewModel.kt
- briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/forums/GroupInputComposable.kt 2 additions, 1 deletion...briarproject/briar/desktop/forums/GroupInputComposable.kt
- briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/forums/sharing/ForumSharingViewModel.kt 6 additions, 2 deletions...ect/briar/desktop/forums/sharing/ForumSharingViewModel.kt
- briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/introduction/IntroductionViewModel.kt 2 additions, 1 deletion...oject/briar/desktop/introduction/IntroductionViewModel.kt
- briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/utils/StringUtils.kt 26 additions, 0 deletions...otlin/org/briarproject/briar/desktop/utils/StringUtils.kt
/* | ||
* Briar Desktop | ||
* Copyright (C) 2021-2022 The Briar Project | ||
|
||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
package org.briarproject.briar.desktop.utils | ||
import org.briarproject.bramble.util.StringUtils | ||
object StringUtils { | ||
fun String.takeUtf8(maxUtf8Length: Int): String = | ||
StringUtils.truncateUtf8(this, maxUtf8Length) | ||
} |