From 4f19826a8d7f39a2796befe1c3ab00deb60aac4d Mon Sep 17 00:00:00 2001 From: wzxjiang Date: Thu, 24 May 2018 12:15:15 +0800 Subject: [PATCH] update utf8.count to count --- Sources/Sdifft/Diff.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/Sdifft/Diff.swift b/Sources/Sdifft/Diff.swift index e9f0bbb..85f21a0 100644 --- a/Sources/Sdifft/Diff.swift +++ b/Sources/Sdifft/Diff.swift @@ -44,8 +44,8 @@ typealias Matrix = [[Int]] /// - to: string that be compared /// - Returns: matrix func drawMatrix(from: String, to: String) -> Matrix { - let row = from.utf8.count + 1 - let column = to.utf8.count + 1 + let row = from.count + 1 + let column = to.count + 1 var result: [[Int]] = Array(repeating: Array(repeating: 0, count: column), count: row) for i in 1..