# AsSpan()

> Returns a ReadOnlySpan_1 view of the UTF-8 encoded string data, excluding the null terminator.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule

```csharp
public ReadOnlySpan<byte> AsSpan()
```

### Returns

| Type                                                                                | Description                            |
| ----------------------------------------------------------------------------------- | -------------------------------------- |
| [ReadOnlySpan\<byte>](https://learn.microsoft.com/dotnet/api/system.readonlyspan-1) | A read-only span over the UTF-8 bytes. |
