# Trim(params char[])

> Returns a new StringView in which all leading and trailing occurrences of a set of specified characters from the current StringView are removed.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Search](/engine/6000.7/script-reference/unityeditor/search.md)
* **Assembly:** UnityEditor

## Trim(char\[])

```csharp
public StringView Trim(params char[] chrs)
```

### Parameters

**** (\[char\[]]\(https\://learn.microsoft.com/dotnet/api/system.char)): A set of characters to remove.

### Returns

| Type                                                                           | Description                                                                           |
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------- |
| [StringView](/engine/6000.7/script-reference/unityeditor/search/stringview.md) | A new [StringView](/engine/6000.7/script-reference/unityeditor/search/stringview.md). |
