# 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/b7a9e3e1c9c54b3cec3a467c5734bf7744541bcf/src/Orleans.Streaming/Common/SegmentBuilder.cs#L22)

```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?`)
