# Sandbox.SandboxSystemExtensions.TruncateFilename

```csharp
static string TruncateFilename(string str, int maxLength, string appendage = null)
```

If the string is longer than this amount of characters then truncate it
If appendage is defined, it will be appended to the end of truncated strings (ie, "..")

### Parameters

- `str` (`string`)
- `maxLength` (`int`)
- `appendage` (`string`), default `null`

### Returns

`string`

Declared in [Sandbox.SandboxSystemExtensions](/api/Sandbox.SandboxSystemExtensions).
Assembly: `Sandbox.System`.
