C# 클래스 BinaryStudio.ClientManager.DomainModel.Infrastructure.StringExtensions

파일 보기 프로젝트 열기: titarenko/ClientManager

공개 메소드들

메소드 설명
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