|
|
@ -14,6 +14,10 @@ public extension String {
|
|
|
|
return (self as NSString).rtlSafeAppend(string)
|
|
|
|
return (self as NSString).rtlSafeAppend(string)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var filterForDisplay: String? {
|
|
|
|
|
|
|
|
return (self as NSString).filterStringForDisplay()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Truncates string to be less than or equal to byteCount, while ensuring we never truncate partial characters for multibyte characters.
|
|
|
|
// Truncates string to be less than or equal to byteCount, while ensuring we never truncate partial characters for multibyte characters.
|
|
|
|
func truncated(toByteCount byteCount: UInt) -> String? {
|
|
|
|
func truncated(toByteCount byteCount: UInt) -> String? {
|
|
|
|
var lowerBoundCharCount = 0
|
|
|
|
var lowerBoundCharCount = 0
|
|
|
|