move category method to be shared

pull/1/head
Michael Kirk 6 years ago
parent 74b25c14f1
commit 11fece2f3f

@ -4,12 +4,6 @@
import Foundation import Foundation
extension String {
var filterForDisplay: String? {
return (self as NSString).filterStringForDisplay()
}
}
public enum GalleryDirection { public enum GalleryDirection {
case before, after, around case before, after, around
} }

@ -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

Loading…
Cancel
Save