TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Apr 2017 |
SwiftSwift Version | 3.1 |
SPMSupports SPM | ✓ |
Maintained by [younatics].
Objectification
if you want to get objects where string is contained in objectSee CHANGELOG for details
Stringfication
is written in Swift 3. Compatible with iOS 8.0+
Import Stringfication
and inherit Stringfication
what you want to make object to string
import Stringfication
struct Model: Stringfication {
var anyProperty: Any?
var arrayProperty: [[String]]?
var intProperty: Int?
var floatProperty: Float?
var stringProperty: String?
}
I made some data sample in Model
var model = Model()
model.anyProperty = [["Developed","by","SeungyounYi"],[1,2,3]]
model.arrayProperty = [["This","is","Stringfication"],["Do","what","you","want"]]
model.intProperty = 777
model.floatProperty = 99.99
model.stringProperty = "younatics"
Get properties
print(model.stringfication.properties())
// -> ["anyProperty", "arrayProperty", "intProperty", "floatProperty", "stringProperty"]
Get values
print(model.stringfication.values())
// -> ["Developed", "by", "SeungyounYi", "1", "2", "3", "This", "is", "Stringfication", "Do", "what", "you", "want", "777", "99.9899979", "younatics"]
Get all
print(model.stringfication.all())
// -> ["anyProperty", "arrayProperty", "intProperty", "floatProperty", "stringProperty", "Developed", "by", "SeungyounYi", "1", "2", "3", "This", "is", "Stringfication", "Do", "what", "you", "want", "777", "99.9899979", "younatics"]
Stringfication is available under the MIT license. See the LICENSE file for more info.