Skip to content

Commit

Permalink
Fix writing percentages as "number/"
Browse files Browse the repository at this point in the history
  • Loading branch information
bridger committed Jun 4, 2016
1 parent c5a2847 commit 73d65d4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions NumberPad/CanvasViewController.swift
Expand Up @@ -1004,8 +1004,7 @@ class CanvasViewController: UIViewController, UIGestureRecognizerDelegate, Numbe
var combinedLabels = classifiedLabels.reduce("", combine: +)
var isPercent = false
if classifiedLabels.count > 1 && combinedLabels.hasSuffix("/") {
// TODO: Fix in swift3
// combinedLabels = combinedLabels.substringToIndex( combinedLabels.endIndex.predecessor())
combinedLabels = combinedLabels.substring(to: combinedLabels.index(before: combinedLabels.endIndex))
isPercent = true
}
var writtenValue: Double?
Expand Down

0 comments on commit 73d65d4

Please sign in to comment.