C# Класс BinaryStudio.ClientManager.DomainModel.Infrastructure.StringExtensions

Показать файл Открыть проект

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

Метод Описание
Cut ( this line, int maxLength ) : string

If string is more then maximum length then it will be cutten for maximum length and last 3 symbols will be changed for "..." string s="This is string"; var result=s.Cut(7); //result will be equal "This..."

Fill ( this format ) : string

Fill string if it is a format string with current arguments.

IsNullOrEmpty ( this line ) : bool

Check if string is empty, or is null or is only spaces in it.

Or ( this line, string defaultValue ) : string

Check if string is empty, or null or only spaces in it then return default value. Otherwise return current string.

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

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

If string is more then maximum length then it will be cutten for maximum length and last 3 symbols will be changed for "..." string s="This is string"; var result=s.Cut(7); //result will be equal "This..."
public static Cut ( this line, int maxLength ) : string
line this
maxLength int Maximum length of string
Результат string

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

Fill string if it is a format string with current arguments.
public static Fill ( this format ) : string
format this
Результат string

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

Check if string is empty, or is null or is only spaces in it.
public static IsNullOrEmpty ( this line ) : bool
line this
Результат bool

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

Check if string is empty, or null or only spaces in it then return default value. Otherwise return current string.
public static Or ( this line, string defaultValue ) : string
line this
defaultValue string Default value
Результат string