Class StringUtility
Last update: 09.03.2026Namespace: OpenTD.Utility
Assembly: OpenTD.dll
Utility methods for working with doubles.
public static class StringUtility
Inheritance
Inherited Members
object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()
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
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
System.String.
Exceptions
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
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
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
System.String.