---
title: byteCount
framework: swift
role: symbol
role_heading: Instance Property
path: swift/rawspan/bytecount
---

# byteCount

The number of bytes in the span.

## Declaration

```swift
var byteCount: Int { get }
```

## Discussion

Discussion To check whether the span is empty, use its isEmpty property instead of comparing count to zero. note: O(1)
