# StringToValue(string)

> Converts a string to an integer.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.0/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
protected override int StringToValue(string str)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The string to convert.

### Returns

| Type                                                       | Description                         |
| ---------------------------------------------------------- | ----------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The integer parsed from the string. |
