     return (matrix.count - (matrixRow - 1)) >= pattern.count
 }
 
-func indexOfPatternString(matrix: [String], matrixRow: Int, patternString: String) -> (Int?) {
+func indexOfPatternString(matrix: [String], matrixRow: Int, matrixColumn: Int, patternString: String) -> (Int?) {
     var column: Int?
+    let matrixLine = matrix[matrixRow]
+    let searchRange = Range(start: matrixLine.startIndex.advancedBy(matrixColumn), end: matrixLine.endIndex)
     
-    if let range = matrix[matrixRow].rangeOfString(patternString) {
-        column = matrix[matrixRow].startIndex.distanceTo(range.startIndex)
+    if let range = matrixLine.rangeOfString(patternString, options: [], range: searchRange, locale: nil) {
+        column = matrixLine.startIndex.distanceTo(range.startIndex)
     }
     
     return column

    "2 2",
    "99",
    "99"]
/*
input = ["1",
    "5 15",
    "111111111111111",

}

func patternWidthCanStillFitInRemainingMatrix(matrix: [String], matrixColumn: Int, pattern: [String]) -> Bool {
    return (matrix[0].characters.count - (matrixColumn)) >= pattern[0].characters.count
}

