---
title: getLength
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/osstring/getlength
---

# getLength

Returns length of string not including null terminator.

## Declaration

```occ
size_t getLength() const;
```

## Return Value

Return Value Length of data present.

## See Also

### Inspecting a String

- [OSStringGetLength](driverkit/osstringgetlength.md)
