Added Character.toInt

This commit is contained in:
陈俊生 2016-04-05 09:06:38 +08:00
parent ea80efe0ed
commit a9cd633ecb
1 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,10 @@ import Foundation
extension Character {
/// EZSE: Converts Character to String //TODO: Add to readme
public var toString: String { return String(self) }
/// EZSE: If the character represents an integer that fits into an Int, returns the corresponding integer.
///TODO: Add to readme
public var toInt: Int? { return Int(String(self)) }
}