I need to format a string to be exactly x characters, but the value I'm formatting can be any length.

```
"" => "          "
"New York" => "New York  "
"New York City" => "New York C"

```

Currently, I'm doing this:

```
$"{(address.City.Substring(0, address.City.Length > 20 ? 20 : address.City.Length)),20}"

```

Bu this becomes quite tedious and error prone the more I do:

```
var builder = new StringBuilder();
builder.AppendLine($"{(address.Street1.Substring(0, address.Street1.Length > 30 ? 30 : address.Street1.Length)),30}");
builder.AppendLine($"{(address.Street2.Substring(0, address.Street2.Length > 30 ? 30 : address.Street2.Length)),30}");
builder.AppendLine($"{(address.City.Substring(0, address.City.Length > 20 ? 20 : address.City.Length)),20}");
builder.AppendLine($"{(address.State.Substring(0, address.State.Length > 5 ? 5 : address.State.Length)),5}");
builder.AppendLine($"{(address.Zip.Substring(0, address.Zip.Length > 10 ? 10 : address.Zip.Length)),10}");
var result = builder.ToString();

```

And I have about 30 other things that I need to do this with as well. It would be really great if there was something like this:

```
address.City.SubstringExact(0, 20)

```