---
title: boolValue
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsstring/boolvalue
---

# boolValue

The Boolean value of the string.

## Declaration

```swift
var boolValue: Bool { get }
```

## Discussion

Discussion This property is true on encountering one of “Y”, “y”, “T”, “t”, or a digit 1-9—the method ignores any trailing characters. This property is false if the receiver doesn’t begin with a valid decimal text representation of a number. The property assumes a decimal representation and skips whitespace at the beginning of the string. It also skips initial whitespace characters, or optional -/+ sign followed by zeroes.

## See Also

### Related Documentation

- [scanInt32(_:)](foundation/scanner/scanint32(_:).md)

### Getting Numeric Values

- [doubleValue](foundation/nsstring/doublevalue.md)
- [floatValue](foundation/nsstring/floatvalue.md)
- [intValue](foundation/nsstring/intvalue.md)
- [integerValue](foundation/nsstring/integervalue.md)
- [longLongValue](foundation/nsstring/longlongvalue.md)
