<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/Character/isWholeNumber",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:SJ13isWholeNumberSbvp"
  },
  "title" : "isWholeNumber"
}
-->

# isWholeNumber

A Boolean value indicating whether this character represents a whole
number.

```
var isWholeNumber: Bool { get }
```

## Discussion

For example, the following characters all represent whole numbers:

- “1” (U+0031 DIGIT ONE) => 1
- “५” (U+096B DEVANAGARI DIGIT FIVE) => 5
- “๙” (U+0E59 THAI DIGIT NINE) => 9
- “万” (U+4E07 CJK UNIFIED IDEOGRAPH-4E07) => 10_000

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)