1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-25 14:29:22 +00:00
comunicmobile/lib/utils/string_utils.dart

7 lines
169 B
Dart
Raw Normal View History

2021-04-27 07:44:11 +00:00
/// String utilities
///
/// @author Pierre Hubert
String reduceString(String str, int maxLen) =>
str.length <= maxLen ? str : str.substring(0, maxLen - 3) + "...";