NimString extension
- on
Methods
-
isHighSurrogate(
int codeUnit) → bool -
isLowSurrogate(
int codeUnit) → bool -
subStringWithMaxLength(
int maxLen, {int startLen = 2, int endLen = 2, String ellipsis = '...'}) → String - 根据最大字符限制截取字符串 例:xx...xx emoji表情按一个字符算,不截取
-
subStringWithoutEmoji(
int start, [int? end]) → String - 截取字符串,但是不截断emoji表情 emoji表情占两个字符,high+low