One two many fix
This commit is contained in:
parent
6274a4e568
commit
7735fd31d4
|
|
@ -31,10 +31,12 @@ public extension String {
|
|||
stringTwo: String,
|
||||
stringMany: String) -> String {
|
||||
|
||||
if (11...14).contains(value) {
|
||||
let lastTwoDigits = value % 100
|
||||
|
||||
if (11...14).contains(lastTwoDigits) {
|
||||
return stringMany
|
||||
} else {
|
||||
let lastDigit = value % 10
|
||||
let lastDigit = lastTwoDigits % 10
|
||||
|
||||
switch lastDigit {
|
||||
case 1:
|
||||
|
|
|
|||
Loading…
Reference in New Issue