Created
September 30, 2016 08:36
-
-
Save moaible/39e5b818f12aa2a92129a7c4f337174b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import RealmSwift | |
| class RealmString: Object, StringLiteralConvertible { | |
| typealias StringLiteralType = String | |
| typealias ExtendedGraphemeClusterLiteralType = StringLiteralType | |
| typealias UnicodeScalarLiteralType = StringLiteralType | |
| var value = "" | |
| required convenience init(_ v: String) { | |
| self.init() | |
| value = v | |
| } | |
| required convenience init(stringLiteral value: String) { | |
| self.init(value) | |
| } | |
| required convenience init(extendedGraphemeClusterLiteral value: String) { | |
| self.init(value) | |
| } | |
| required convenience init(unicodeScalarLiteral value: String) { | |
| self.init(value) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment