C# Класс TVSorter.StringExtensions

Extension methods for the string type.
Показать файл Открыть проект

Открытые методы

Метод Описание
FormatLength ( this str, int length ) : string

Returns a string that is exactly the length specified, either truncating or padding the specified string.

Truncate ( this str, int length = 30 ) : string

Returns a string that is truncated to the specified length if it is longer.

Приватные методы

Метод Описание
AlphaNumericOnly ( this str ) : string

Removes special characters and spaces from the string.

GetFileSafeName ( this str ) : string

Strips any characters that can't be in a file name from the specified string.

RemoveSpacerChars ( this str ) : string

Removes the spacer chars from the specfied string.

RemoveSpecialChars ( this str ) : string

Removes special characters from the string.

Описание методов

FormatLength() публичный статический Метод

Returns a string that is exactly the length specified, either truncating or padding the specified string.
public static FormatLength ( this str, int length ) : string
str this The string to format.
length int The target length.
Результат string

Truncate() публичный статический Метод

Returns a string that is truncated to the specified length if it is longer.
public static Truncate ( this str, int length = 30 ) : string
str this The string to truncate.
length int The length to truncate to.
Результат string