Skip to main content

OpenTD reference 2026 R1

Class StringUtility

Last update: 09.03.2026

Namespace: OpenTD.Utility
Assembly: OpenTD.dll

Utility methods for working with doubles.

public static class StringUtility

Inheritance

object ← StringUtility

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Methods

AppendToFilename(string, string)

Appends a string to a pathname, without changing the extension.

public static string AppendToFilename(string path, string append)

Parameters

path string

The input path.

append string

The string to append at the end, but before the extension.

Returns

string

System.String.

AppendToStringWithDelimiter(string, string, string)

Appends a string to a string with a delimiter. If the original string is empty or whitespace, just returns the append string.

public static string AppendToStringWithDelimiter(string input, string append, string delimiter = " ")

Parameters

input string

The input string.

append string

The append string.

delimiter string

The delimiter.

Returns

string

System.String.

Exceptions

OpenTDException

Input string is null. or Append string is null. or Delimiter string is null.

GetHash(string)

Gets a string representing the integer hash the CLR generates for the input string.

public static string GetHash(string input)

Parameters

input string

The input string.

Returns

string

System.String.

GetRecursiveMessage(Exception)

Recursively walks through successive inner exceptions to generate a single exception message.

public static string GetRecursiveMessage(Exception ex)

Parameters

ex Exception

The exception.

Returns

string

System.String.

GetRecursiveStackTrace(Exception)

Recursively walks through successive inner exceptions to generate a single stack trace.

public static string GetRecursiveStackTrace(Exception ex)

Parameters

ex Exception

The ex.

Returns

string

System.String.

Connect with Ansys