Make 'isUnknown' method more precise
This commit is contained in:
parent
a2edf41d33
commit
e8afd251ed
2 changed files with 8 additions and 4 deletions
|
|
@ -58,7 +58,8 @@ public struct Constants {
|
|||
}
|
||||
|
||||
static func isUnknown(_ string: String) -> Bool {
|
||||
return string.starts(with: UNKNOWN)
|
||||
let components = string.components(separatedBy: " ")
|
||||
return components.count == 2 && components[0] == UNKNOWN && UInt(components[1]) != nil
|
||||
}
|
||||
|
||||
static func unknown(_ number: UInt) -> String {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue