# Contains<T, T2>(ref T, in T2)

> Returns true if a given substring occurs within this string.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule

## Contains\<T, U>(T, T)

```csharp
public static bool Contains<T, T2>(this ref T fs, in T2 other) where T : unmanaged, INativeList<byte>, IUTF8Bytes where T2 : unmanaged, INativeList<byte>, IUTF8Bytes
```

### Parameters

**** (T): A string to search.**** (T): A substring to search for within this string.

### Returns

| Type                                                          | Description                                      |
| ------------------------------------------------------------- | ------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the substring occurs within this string. |
