You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
402 B
21 lines
402 B
//
|
|
// Character.swift
|
|
// ExSwift
|
|
//
|
|
// Created by Cenny Davidsson on 2014-12-08.
|
|
// Copyright (c) 2014 pNre. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public extension Character {
|
|
|
|
/**
|
|
If the character represents an integer that fits into an Int, returns
|
|
the corresponding integer.
|
|
*/
|
|
public func toInt () -> Int? {
|
|
return String(self).toInt()
|
|
}
|
|
|
|
}
|