<commit_before>//
//  Int+Utils.swift
//  APExtensions
//
//  Created by <NAME> on 2/5/19.
//  Copyright © 2019 <NAME>. All rights reserved.
//

import Foundation


public extension Int {
    
    /// Returns whether number is even
    var isEven: Bool { self % 2 == 0 }
    
    /// Returns whether number is odd
    var isOdd: Bool { self % 2 == 1 }
    
    /// Returns `true` if value end on 1.
    var isSingular: Bool { self % 10 == 1 }
}

// ******************************* MARK: - As

public extension Int {
    
    /// Returns `self` as `CGFloat`
    var asCGFloat: CGFloat { .init(self) }
    
    /// Returns `self` as `Double`
    var asDouble: Double { .init(self) }
    
    /// Returns `self` as `Float`
    var asFloat: Float { .init(self) }
    
    /// Returns `self` as `String`
    var asString: String { .init(self) }
    
    /// Returns `self` as HEX `String` in a format like `0xAABB11`
    var asHexString: String { .init(format:"0x%02X", self) }
    
    /// Returns `self` as `TimeInterval`
    var asTimeInterval: TimeInterval { .init(self) }
}
<commit_msg>- Int32 .asInt<commit_after>//
//  Int+Utils.swift
//  APExtensions
//
//  Created by <NAME> on 2/5/19.
//  Copyright © 2019 <NAME>. All rights reserved.
//

import Foundation


public extension Int {
    
    /// Returns whether number is even
    var isEven: Bool { self % 2 == 0 }
    
    /// Returns whether number is odd
    var isOdd: Bool { self % 2 == 1 }
    
    /// Returns `true` if value end on 1.
    var isSingular: Bool { self % 10 == 1 }
}

// ******************************* MARK: - As

public extension Int {
    
    /// Returns `self` as `CGFloat`
    var asCGFloat: CGFloat { .init(self) }
    
    /// Returns `self` as `Double`
    var asDouble: Double { .init(self) }
    
    /// Returns `self` as `Float`
    var asFloat: Float { .init(self) }
    
    /// Returns `self` as `String`
    var asString: String { .init(self) }
    
    /// Returns `self` as HEX `String` in a format like `0xAABB11`
    var asHexString: String { .init(format:"0x%02X", self) }
    
    /// Returns `self` as `TimeInterval`
    var asTimeInterval: TimeInterval { .init(self) }
}

// ******************************* MARK: - Int32

public extension Int32 {
    
    /// Returns `self` as `Int`
    var asInt: Int { Int(self) }
}

{'fraction_non_alphanumeric': 0.17966393795777683, 'fraction_numerical': 0.021542438604049977, 'mean_word_length': 2.159183673469388, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4229869', 'n_tokens_mistral': 817, 'n_tokens_neox': 767, 'n_words': 245}