# SegmentBuilder.CalculateAppendSize(string)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.common.segmentbuilder/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.common.segmentbuilder/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Streaming/Common/SegmentBuilder.cs#L23)

```csharp
public static int CalculateAppendSize(string str)
```

Calculates how much space will be needed to append the provided string into the segment.

### Parameters

- `str` (`string`)
