C# 클래스 RestSharp.Extensions.StringExtensions

파일 보기 프로젝트 열기: nicwise/RestSharp

공개 메소드들

메소드 설명
AddDashes ( this pascalCasedWord ) : string

Add dashes to a pascal-cased string

AddUnderscores ( this pascalCasedWord ) : string

Add underscores to a pascal-cased string

GetNameVariants ( this name, CultureInfo culture ) : IEnumerable

Return possible variants of a name for name matching.

HasValue ( this input ) : bool

Check that a string is not null or empty

HtmlAttributeEncode ( this input ) : string
HtmlDecode ( this input ) : string
HtmlEncode ( this input ) : string
IsUpperCase ( this inputString ) : bool

Checks to see if a string is all uppper case

MakeInitialLowerCase ( this word ) : string

Convert the first letter of a string to lower case

Matches ( this input, string pattern ) : bool

Checks a string to see if it matches a regex

ParseJsonDate ( this input, CultureInfo culture ) : System.DateTime

Parses most common JSON date formats

RemoveSurroundingQuotes ( this input ) : string

Remove leading and trailing " from a string

RemoveUnderscoresAndDashes ( this input ) : string

Remove underscores from a string

ToCamelCase ( this lowercaseAndUnderscoredWord, CultureInfo culture ) : string

Converts a string to camel case

ToPascalCase ( this lowercaseAndUnderscoredWord, CultureInfo culture ) : string

Converts a string to pascal case

ToPascalCase ( this text, bool removeUnderscores, CultureInfo culture ) : string

Converts a string to pascal case with the option to remove underscores

UrlDecode ( this input ) : string
UrlEncode ( this input ) : string

Uses Uri.EscapeDataString() based on recommendations on MSDN http://blogs.msdn.com/b/yangxind/archive/2006/11/09/don-t-use-net-system-uri-unescapedatastring-in-url-decoding.aspx

비공개 메소드들

메소드 설명
ExtractDate ( string input, string pattern, CultureInfo culture ) : System.DateTime
ParseFormattedDate ( string input, CultureInfo culture ) : System.DateTime

메소드 상세

AddDashes() 공개 정적인 메소드

Add dashes to a pascal-cased string
public static AddDashes ( this pascalCasedWord ) : string
pascalCasedWord this String to convert
리턴 string

AddUnderscores() 공개 정적인 메소드

Add underscores to a pascal-cased string
public static AddUnderscores ( this pascalCasedWord ) : string
pascalCasedWord this String to convert
리턴 string

GetNameVariants() 공개 정적인 메소드

Return possible variants of a name for name matching.
public static GetNameVariants ( this name, CultureInfo culture ) : IEnumerable
name this String to convert
culture System.Globalization.CultureInfo The culture to use for conversion
리턴 IEnumerable

HasValue() 공개 정적인 메소드

Check that a string is not null or empty
public static HasValue ( this input ) : bool
input this String to check
리턴 bool

HtmlAttributeEncode() 공개 정적인 메소드

public static HtmlAttributeEncode ( this input ) : string
input this
리턴 string

HtmlDecode() 공개 정적인 메소드

public static HtmlDecode ( this input ) : string
input this
리턴 string

HtmlEncode() 공개 정적인 메소드

public static HtmlEncode ( this input ) : string
input this
리턴 string

IsUpperCase() 공개 정적인 메소드

Checks to see if a string is all uppper case
public static IsUpperCase ( this inputString ) : bool
inputString this String to check
리턴 bool

MakeInitialLowerCase() 공개 정적인 메소드

Convert the first letter of a string to lower case
public static MakeInitialLowerCase ( this word ) : string
word this String to convert
리턴 string

Matches() 공개 정적인 메소드

Checks a string to see if it matches a regex
public static Matches ( this input, string pattern ) : bool
input this String to check
pattern string Pattern to match
리턴 bool

ParseJsonDate() 공개 정적인 메소드

Parses most common JSON date formats
public static ParseJsonDate ( this input, CultureInfo culture ) : System.DateTime
input this JSON value to parse
culture System.Globalization.CultureInfo
리턴 System.DateTime

RemoveSurroundingQuotes() 공개 정적인 메소드

Remove leading and trailing " from a string
public static RemoveSurroundingQuotes ( this input ) : string
input this String to parse
리턴 string

RemoveUnderscoresAndDashes() 공개 정적인 메소드

Remove underscores from a string
public static RemoveUnderscoresAndDashes ( this input ) : string
input this String to process
리턴 string

ToCamelCase() 공개 정적인 메소드

Converts a string to camel case
public static ToCamelCase ( this lowercaseAndUnderscoredWord, CultureInfo culture ) : string
lowercaseAndUnderscoredWord this String to convert
culture System.Globalization.CultureInfo
리턴 string

ToPascalCase() 공개 정적인 메소드

Converts a string to pascal case
public static ToPascalCase ( this lowercaseAndUnderscoredWord, CultureInfo culture ) : string
lowercaseAndUnderscoredWord this String to convert
culture System.Globalization.CultureInfo
리턴 string

ToPascalCase() 공개 정적인 메소드

Converts a string to pascal case with the option to remove underscores
public static ToPascalCase ( this text, bool removeUnderscores, CultureInfo culture ) : string
text this String to convert
removeUnderscores bool Option to remove underscores
culture System.Globalization.CultureInfo
리턴 string

UrlDecode() 공개 정적인 메소드

public static UrlDecode ( this input ) : string
input this
리턴 string

UrlEncode() 공개 정적인 메소드

Uses Uri.EscapeDataString() based on recommendations on MSDN http://blogs.msdn.com/b/yangxind/archive/2006/11/09/don-t-use-net-system-uri-unescapedatastring-in-url-decoding.aspx
public static UrlEncode ( this input ) : string
input this
리턴 string