# ToOp(string)

> Converts a textual value to its operator value if possible.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Hierarchy](/engine/6000.6/script-reference/unity/hierarchy.md)
* **Assembly:** UnityEngine.HierarchyCoreModule

```csharp
public static HierarchySearchFilterOperator ToOp(string op)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The textual operator. For example: =, \<=, :, and ....

### Returns

| Type                                                                                                              | Description                                                                                                                                                                    |
| ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [HierarchySearchFilterOperator](/engine/6000.6/script-reference/unity/hierarchy/hierarchysearchfilteroperator.md) | The `HierarchySearchFilterOperator` that matches the parsed string. For example, this function parses the string "=" and converts it to `HierarchySearchFilterOperator.Equal`. |
