Merge pull request #89 from TouchInstinct/fix/oneTwoMany
Fix/one two many
This commit is contained in:
commit
5420410222
|
|
@ -11,3 +11,7 @@
|
|||
## 0.5.8
|
||||
|
||||
- **Fix**: Synchronization over `NSRecursiveLock` for request count tracker in NetworkService
|
||||
|
||||
## 0.5.9
|
||||
|
||||
- **Fix**: One-two-many fixed for values more than 99
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = "LeadKit"
|
||||
s.version = "0.5.8"
|
||||
s.version = "0.5.9"
|
||||
s.summary = "iOS framework with a bunch of tools for rapid development"
|
||||
s.homepage = "https://github.com/TouchInstinct/LeadKit"
|
||||
s.license = "Apache License, Version 2.0"
|
||||
|
|
|
|||
|
|
@ -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