---
title: numeric
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nsstring/compareoptions/numeric
---

# numeric

Numbers within strings are compared using numeric value, that is, Name2.txt < Name7.txt < Name25.txt.

## Declaration

```swift
static var numeric: NSString.CompareOptions { get }
```

## Discussion

Discussion Numeric comparison only applies to the numerals in the string, not other characters that would have meaning in a numeric representation such as a negative sign, a comma, or a decimal point. This option only applies to compare methods, not find.

## See Also

### Constants

- [caseInsensitive](foundation/nsstring/compareoptions/caseinsensitive.md)
- [literal](foundation/nsstring/compareoptions/literal.md)
- [backwards](foundation/nsstring/compareoptions/backwards.md)
- [anchored](foundation/nsstring/compareoptions/anchored.md)
- [diacriticInsensitive](foundation/nsstring/compareoptions/diacriticinsensitive.md)
- [widthInsensitive](foundation/nsstring/compareoptions/widthinsensitive.md)
- [forcedOrdering](foundation/nsstring/compareoptions/forcedordering.md)
- [regularExpression](foundation/nsstring/compareoptions/regularexpression.md)
