 //
 
 import Foundation
+
+private extension String {
+  
+  func charAt(_ i: Int) -> Character {
+    let index = self.index(self.startIndex, offsetBy: i)
+    return self[index]
+  }
+  
+  func charStrAt(_ i: Int) -> String {
+    return String(charAt(i))
+  }
+}
 
 public extension String {
   

          // Acronym Bonus
          // Weighing Logic: Typing the first character of an acronym is as if you
          // preceded it with two perfect character matches.
          if string[string.index(idxOf, offsetBy: -1)] == " " {
            charScore += 0.8
          }
        }

      // Find next first case-insensitive match of word's i-th character.
      // The search in "string" begins at "startAt".
      
      if let range = lString.range(
        of: lWord.charStrAt(i),
        options: [.caseInsensitive, .diacriticInsensitive],
        range: Range<String.Index>(startAt..<lString.endIndex),
        locale: nil
        ) {
        
        // start index of word's i-th character in string.
        idxOf = range.lowerBound
        
        if startAt == idxOf {
          // Consecutive letter & start-of-string Bonus
          charScore = 0.7
