> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class StringExtensions

Namespace: [OpenTD.Utility](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Utility)\
Assembly: OpenTD.dll

Utility methods for working with strings.

```csharp theme={null}
public static class StringExtensions
```

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[StringExtensions](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Utility.StringExtensions.md)

## Inherited Members

[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)),
[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)),
[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode),
[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype),
[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone),
[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals),
[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Methods

### FirstToUpper(string)

Capitalizes the first letter of a string.

```csharp theme={null}
public static string FirstToUpper(this string str)
```

#### Parameters

`str` [string](https://learn.microsoft.com/dotnet/api/system.string)

#### Returns

[string](https://learn.microsoft.com/dotnet/api/system.string)

System.String.

### find\_first\_of(string, string, int)

Finds the position of the first of a list of characters. Returns -1 on failure.

```csharp theme={null}
public static int find_first_of(this string input, string characters, int startPosition = 0)
```

#### Parameters

`input` [string](https://learn.microsoft.com/dotnet/api/system.string)

`characters` [string](https://learn.microsoft.com/dotnet/api/system.string)

The characters to search for.

`startPosition` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The starting position to look in the string. Defaults to 0.

#### Returns

[int](https://learn.microsoft.com/dotnet/api/system.int32)
