메소드 | 설명 | |
---|---|---|
IfEmpty ( this input, string otherString ) : string |
If input is null or empty, return otherString http://www.stum.de/2010/01/16/extension-method-return-another-string-if-string-is-null-or-empty/ |
|
ReplaceAll ( this input, string>.IDictionary |
Replace all occurences of a certain char with a string http://www.stum.de/2010/02/16/an-extension-method-to-replace-multiple-chars-in-a-string/ |
|
SafeSubstring ( this input, int startIndex, int length, string suffix = "" ) : string |
A safe Substring method that does not throw an exception if startIndex or length is out of bounds of the string http://www.stum.de/2009/02/27/a-safe-stringsubstring-extension-method/ |
|
Use ( this input ) : string |
A shortcut for string.Format http://www.stum.de/2009/08/20/turning-string-format-into-an-extension-method/ |
public static IfEmpty ( this input, string otherString ) : string | ||
input | this | |
otherString | string | |
리턴 | string |
public static ReplaceAll ( this input, string>.IDictionary |
||
input | this | |
replacements | string>.IDictionary | A dictionary where the key is a char to replace and the value is the string to replace it with. Value can be null. |
리턴 | string |
public static SafeSubstring ( this input, int startIndex, int length, string suffix = "" ) : string | ||
input | this | |
startIndex | int | |
length | int | |
suffix | string | An optional suffix to append if the string is truncated |
리턴 | string |