Show / Hide Table of Contents

Class StringExtensions

Extension methods relating to string

Inheritance
System.Object
StringExtensions
Namespace: MESL.SqlRace.Domain.Extensions
Assembly: MESL.SqlRace.Domain.dll
Syntax
public static class StringExtensions : Object

Methods

TrimAllWithInplaceCharArray(String)

Trims all spaces in a string.

Declaration
public static string TrimAllWithInplaceCharArray(this string str)
Parameters
Type Name Description
System.String str

The string.

Returns
Type Description
System.String

Truncate(String, Int32)

Truncate a string to a maximum length

Declaration
public static string Truncate(this string value, int maxLength)
Parameters
Type Name Description
System.String value
System.Int32 maxLength
Returns
Type Description
System.String

TryParse<T>(String, out T)

Parse a string to a generic value

Declaration
public static bool TryParse<T>(this string inValue, out T value)
Parameters
Type Name Description
System.String inValue

The string value

T value

The converted value

Returns
Type Description
System.Boolean
Type Parameters
Name Description
T

The type to convert

Back to top Generated by DocFX