# Sandbox.SandboxSystemExtensions.QuoteSafe

```csharp
static string QuoteSafe(string str, bool optional = False)
```

Puts quote marks around a string. Internal quotes are backslashed.

### Parameters

- `str` (`string`)
- `optional` (`bool`), default `False`

### Returns

`string`

Declared in [Sandbox.SandboxSystemExtensions](/api/Sandbox.SandboxSystemExtensions).
Assembly: `Sandbox.System`.
