https://github.com/ikesyo/swiftconversioning
Type conversion library for Swift lang.
https://github.com/ikesyo/swiftconversioning
Last synced: 10 months ago
JSON representation
Type conversion library for Swift lang.
- Host: GitHub
- URL: https://github.com/ikesyo/swiftconversioning
- Owner: ikesyo
- License: mit
- Created: 2014-06-13T08:07:04.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-16T12:10:28.000Z (about 12 years ago)
- Last Synced: 2025-10-06T01:38:35.235Z (10 months ago)
- Language: Swift
- Size: 156 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SwiftConversioning 
Type conversion library for Swift lang. It uses the following feature:
```swift
extension Type {
@conversion func __conversion() -> TypeToConvert {
return TypeToConvert(self)
}
}
```
## Supported Conversions
### Array ->
- NSSet
- NSOrderedSet
### String ->
- Array\ like Ruby's `%w` notation
- NSDecimalNumber
- NSLocale
- NSRegularExpression
- NSScanner
- NSURL
- NSURLRequest
- NSUUID
### NSString ->
- NSCalendar
- Because `NSGregorianCalendar` and so on return `NSString!`, not `String`.
## Contributors
Syo Ikeda, [suicaicoca@gmail.com](mailto://suicaicoca@gmail.com)
## License
SwiftConversioning is licensed under the MIT license.