Commit dfce91ae authored by Ilya Prokhorov's avatar Ilya Prokhorov

lhs smaller than rhs if there is more symbols in rhs

parent 337fc9d2
......@@ -6,7 +6,7 @@ func lexiCompare(_ lhs: String, _ rhs: String) -> Int {
for i in 0...lhs.count {
if i >= rhs.count {
return 0
return -1
}
let lhsSymbol = lhs[i].value
let rhsSymbol = rhs[i].value
......
......@@ -6,7 +6,7 @@ func lexiCompare(_ lhs: String, _ rhs: String) -> Int {
for i in 0...lhs.count {
if i >= rhs.count {
return 0
return -1
}
let lhsSymbol = lhs[i]
let rhsSymbol = rhs[i]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment