<commit_before>//
//  String+Range.swift
//  Pods
//
//  Created by <NAME> on 05/06/2017.
//
//

import Foundation

extension String {

    // swiftlint:disable identifier_name
    subscript (r: Range<Int>) -> String? {
        guard
            let start = index(startIndex, offsetBy: r.lowerBound, limitedBy: endIndex),
            // swiftlint:disable identifier_name
            let end = index(startIndex, offsetBy: r.upperBound - r.lowerBound, limitedBy: endIndex) else {
            return nil
        }

        return String(self[Range(start ..< end)])
    }

}<commit_msg>Fix the compile warning in Xcode 10.<commit_after>//
//  String+Range.swift
//  Pods
//
//  Created by <NAME> on 05/06/2017.
//
//

import Foundation

extension String {

    // swiftlint:disable identifier_name
    subscript (r: Range<Int>) -> String? {
        guard
            let start = index(startIndex, offsetBy: r.lowerBound, limitedBy: endIndex),
            // swiftlint:disable identifier_name
            let end = index(startIndex, offsetBy: r.upperBound - r.lowerBound, limitedBy: endIndex) else {
            return nil
        }
        
        let range = start..<end
        return String(self[range])
    }

}
{'fraction_non_alphanumeric': 0.1188118811881188, 'fraction_numerical': 0.01485148514851485, 'mean_word_length': 2.1262886597938144, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '4258842', 'n_tokens_mistral': 378, 'n_tokens_neox': 357, 'n_words': 92}