C# 클래스 Material.EBDeployer.DeployLogic.Extensions.StringExtensions

파일 보기 프로젝트 열기: MaterialDev/elastic-beanstalk-deploy

공개 메소드들

메소드 설명
Clean ( this str, List oldValues, string newValue ) : string

Given a list of values to replace, it looks them up and replaces them with the newValue.

Contains ( this source, string toCheck, System.StringComparison comparison ) : bool
DoubleParseOrDefault ( this doubleString, double defaultValue ) : double

Attempts to parse a string into an Double value, if the parse is not successful, then the given defaultValue is returned.

EmptyToNull ( this value ) : string
Int32ParseOrDefault ( this intString, int defaultValue ) : int

Attempts to parse a string into an Int32 value, if the parse is not successful, then the given defaultValue is returned.

IsEqualIgnoreCase ( this s1, string s2 ) : bool

Checks if the two strings are equal ignoring casing.

Split ( this input, string separator ) : IEnumerable
Trim ( this inputs, char trimCharacters = null ) : IEnumerable
TrimEnd ( this source, string value ) : string

Removes the string value from the end of the source string iff the source string ends with the value string.

Truncate ( this value, int length ) : string

Truncates a string to the supplied length if the current length of the string exceeds the given length parameter.

메소드 상세

Clean() 공개 정적인 메소드

Given a list of values to replace, it looks them up and replaces them with the newValue.
public static Clean ( this str, List oldValues, string newValue ) : string
str this
oldValues List List of old values to replace
newValue string Value that will replace each occurance of the old values.
리턴 string

Contains() 공개 정적인 메소드

public static Contains ( this source, string toCheck, System.StringComparison comparison ) : bool
source this
toCheck string
comparison System.StringComparison
리턴 bool

DoubleParseOrDefault() 공개 정적인 메소드

Attempts to parse a string into an Double value, if the parse is not successful, then the given defaultValue is returned.
public static DoubleParseOrDefault ( this doubleString, double defaultValue ) : double
doubleString this String that will be parsed
defaultValue double Value that is returned if string is not parsable
리턴 double

EmptyToNull() 공개 정적인 메소드

public static EmptyToNull ( this value ) : string
value this
리턴 string

Int32ParseOrDefault() 공개 정적인 메소드

Attempts to parse a string into an Int32 value, if the parse is not successful, then the given defaultValue is returned.
public static Int32ParseOrDefault ( this intString, int defaultValue ) : int
intString this String that will be parsed
defaultValue int Value that is returned if string is not parsable
리턴 int

IsEqualIgnoreCase() 공개 정적인 메소드

Checks if the two strings are equal ignoring casing.
public static IsEqualIgnoreCase ( this s1, string s2 ) : bool
s1 this
s2 string
리턴 bool

Split() 공개 정적인 메소드

public static Split ( this input, string separator ) : IEnumerable
input this
separator string
리턴 IEnumerable

Trim() 공개 정적인 메소드

public static Trim ( this inputs, char trimCharacters = null ) : IEnumerable
inputs this
trimCharacters char
리턴 IEnumerable

TrimEnd() 공개 정적인 메소드

Removes the string value from the end of the source string iff the source string ends with the value string.
public static TrimEnd ( this source, string value ) : string
source this
value string
리턴 string

Truncate() 공개 정적인 메소드

Truncates a string to the supplied length if the current length of the string exceeds the given length parameter.
Thrown when value is null.
public static Truncate ( this value, int length ) : string
value this A string.
length int The number of characters to truncate the string at.
리턴 string