diff --git a/BXSwiftUtils/Strings/Numeric+Localized.swift b/BXSwiftUtils/Strings/Numeric+Localized.swift index d5328b9..eb88dd0 100644 --- a/BXSwiftUtils/Strings/Numeric+Localized.swift +++ b/BXSwiftUtils/Strings/Numeric+Localized.swift @@ -139,7 +139,8 @@ extension String var allowedChars = CharacterSet.decimalDigits allowedChars.insert(charactersIn:decimalSeparator) allowedChars.insert(charactersIn:groupingSeparator) - + allowedChars.insert(charactersIn:"+-") + let illegalChars = allowedChars.inverted return self.components(separatedBy:illegalChars).joined(separator:"")