# Contains

> Checks if a character is contained in the StringView.

## Definition

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

## Contains(char, StringComparison)

Checks if a character is contained in the [StringView](/engine/6000.6/script-reference/unityeditor/search/stringview.md).

```csharp
public bool Contains(char c, StringComparison ordinal = StringComparison.Ordinal)
```

### Parameters

**** (\[char]\(https\://learn.microsoft.com/dotnet/api/system.char)): A character.**** (\[StringComparison]\(https\://learn.microsoft.com/dotnet/api/system.stringcomparison)): A string comparison option.

### Returns

| Type                                                          | Description                                      |
| ------------------------------------------------------------- | ------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the character is found, otherwise false. |

## Contains(StringView, StringComparison)

Checks if a character is contained in the [StringView](/engine/6000.6/script-reference/unityeditor/search/stringview.md).

```csharp
public bool Contains(StringView s, StringComparison ordinal = StringComparison.Ordinal)
```

### Parameters

**** (\[StringView]\(/engine/6000.6/script-reference/unityeditor/search/stringview)): **** (\[StringComparison]\(https\://learn.microsoft.com/dotnet/api/system.stringcomparison)): A string comparison option.

### Returns

| Type                                                          | Description                                      |
| ------------------------------------------------------------- | ------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the character is found, otherwise false. |

## Contains(string, StringComparison)

Checks if a character is contained in the [StringView](/engine/6000.6/script-reference/unityeditor/search/stringview.md).

```csharp
public bool Contains(string s, StringComparison ordinal = StringComparison.Ordinal)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): **** (\[StringComparison]\(https\://learn.microsoft.com/dotnet/api/system.stringcomparison)): A string comparison option.

### Returns

| Type                                                          | Description                                      |
| ------------------------------------------------------------- | ------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the character is found, otherwise false. |
