C# 클래스 Ext.Net.Utilities.StringUtils

파일 보기 프로젝트 열기: extnet/Utilities

공개 메소드들

메소드 설명
Base64Decode ( this text ) : string

Base64 string decoder

Base64Encode ( this text ) : string

Base64 string encoder

Chop ( this text ) : string

Chops one character from each end of string.

Chop ( this text, int characters ) : string

Chops the specified number of characters from each end of string.

Chop ( this text, string character ) : string

Chops the specified string from each end of the string. If the character does not exist on both ends of the string, the characters are not chopped.

ConcatWith ( this instance ) : string

Add the args strings the source text string.

ConcatWith ( this instance, string text ) : string

Add the text string to the source string.

Contains ( this instance ) : bool

Determines if the string contains any of the args. If yes, returns true, otherwise returns false.

Ellipsis ( this text, int length ) : string

Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified length

Ellipsis ( this text, int length, bool word ) : string

Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified length

Enquote ( this text ) : string

EnsureSemiColon ( this text ) : string

FormatRegexPattern ( this regex ) : string

FormatWith ( this format ) : string

Format the string with the args.

FormatWith ( this format, IFormatProvider provider ) : string

FormatWith ( this format, object source ) : string

If ( this text, string test, string valueIfTrue ) : string

IfNot ( this text, string test, string valueIfTrue ) : string

IsEmpty ( this text ) : bool

Determine is the string is null or empty.

IsLowerCamelCase ( this text ) : bool

IsNotEmpty ( this text ) : bool

Determine is the string is NOT null or empty.

Join ( this items ) : string

Join ( this items, string separator ) : string

Join ( this items, string separator, string template ) : string

Join the items together

LeftOf ( this text, char c ) : string

Left of the first occurance of c

LeftOf ( this text, char c, int n ) : string

Left of the n'th occurance of c

LeftOf ( this text, string value ) : string

Left of the first occurance of text

LeftOfRightmostOf ( this text, char c ) : string

LeftOfRightmostOf ( this text, string value ) : string

PadLeft ( this text, char c, Int32 totalLength ) : string

Pad the left side of a string with characters to make the total length.

PadRight ( this text ) : string

Pad the right side of a string with a '0' if a single character.

PadRight ( this text, char c, Int32 totalLength ) : string

Pad the right side of a string with characters to make the total length.

Randomize ( this chars ) : string

Randomize ( this chars, int length ) : string

Generate a random string of character at a certain length

ReplaceLastInstanceOf ( this text, string oldValue, string newValue ) : string

RightOf ( this text, char c ) : string

Right of the first occurance of c

RightOf ( this text, char c, int n ) : string

Right of the n'th occurance of c

RightOf ( this text, string value ) : string

Right of the first occurance of text

RightOf ( this text, string c, int n ) : string

Right of the n'th occurance of c

RightOfRightmostOf ( this text, char c ) : string

RightOfRightmostOf ( this text, string value ) : string

Test ( this text, string pattern ) : bool

Test ( this text, string pattern, RegexOptions options ) : bool

ToCamelCase ( this text ) : string

ToCamelCase ( this values, string separator ) : string

ToCharacterSeparatedFileName ( this name, char separator, string extension ) : string

Accepts a string like "ArrowRotateClockwise" and returns "arrow_rotate_clockwise.png".

ToLowerCamelCase ( this text ) : string

ToMD5Hash ( this text ) : string

MD5Hash's a string.

ToTitleCase ( this text ) : string

Converts the first character of each word to Uppercase. Example: "the lazy dog" returns "The Lazy Dog"

ToTitleCase ( this text, CultureInfo ci ) : string

Converts the first character of each word to Uppercase. Example: "the lazy dog" returns "The Lazy Dog"

Wrap ( this text, string wrapByText ) : string

Wrap ( this text, string wrapStart, string wrapEnd ) : string

비공개 메소드들

메소드 설명
Between ( this text, string start, string end ) : string
Eval ( object source, string expression ) : object

FormatWith ( this format, IFormatProvider provider, object source ) : string
Replace ( this instance, string oldValues, string>.Func convert ) : string
Replace ( this instance, string oldValues, string newValue ) : string
Subarray ( this items, int start ) : string[]
Subarray ( this items, int start, int length ) : string[]

메소드 상세

Base64Decode() 공개 정적인 메소드

Base64 string decoder
public static Base64Decode ( this text ) : string
text this The text string to decode
리턴 string

Base64Encode() 공개 정적인 메소드

Base64 string encoder
public static Base64Encode ( this text ) : string
text this The text string to encode
리턴 string

Chop() 공개 정적인 메소드

Chops one character from each end of string.
public static Chop ( this text ) : string
text this
리턴 string

Chop() 공개 정적인 메소드

Chops the specified number of characters from each end of string.
public static Chop ( this text, int characters ) : string
text this
characters int
리턴 string

Chop() 공개 정적인 메소드

Chops the specified string from each end of the string. If the character does not exist on both ends of the string, the characters are not chopped.
public static Chop ( this text, string character ) : string
text this
character string
리턴 string

ConcatWith() 공개 정적인 메소드

Add the args strings the source text string.
public static ConcatWith ( this instance ) : string
instance this
리턴 string

ConcatWith() 공개 정적인 메소드

Add the text string to the source string.
public static ConcatWith ( this instance, string text ) : string
instance this
text string
리턴 string

Contains() 공개 정적인 메소드

Determines if the string contains any of the args. If yes, returns true, otherwise returns false.
public static Contains ( this instance ) : bool
instance this The instance of the string
리턴 bool

Ellipsis() 공개 정적인 메소드

Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified length
public static Ellipsis ( this text, int length ) : string
text this The string to truncate
length int The maximum length to allow before truncating
리턴 string

Ellipsis() 공개 정적인 메소드

Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified length
public static Ellipsis ( this text, int length, bool word ) : string
text this The string to truncate
length int The maximum length to allow before truncating
word bool True to try to find a common work break
리턴 string

Enquote() 공개 정적인 메소드

public static Enquote ( this text ) : string
text this
리턴 string

EnsureSemiColon() 공개 정적인 메소드

public static EnsureSemiColon ( this text ) : string
text this
리턴 string

FormatRegexPattern() 공개 정적인 메소드

public static FormatRegexPattern ( this regex ) : string
regex this
리턴 string

FormatWith() 공개 정적인 메소드

Format the string with the args.
public static FormatWith ( this format ) : string
format this
리턴 string

FormatWith() 공개 정적인 메소드

public static FormatWith ( this format, IFormatProvider provider ) : string
format this
provider IFormatProvider
리턴 string

FormatWith() 공개 정적인 메소드

public static FormatWith ( this format, object source ) : string
format this
source object
리턴 string

If() 공개 정적인 메소드

public static If ( this text, string test, string valueIfTrue ) : string
text this
test string
valueIfTrue string
리턴 string

IfNot() 공개 정적인 메소드

public static IfNot ( this text, string test, string valueIfTrue ) : string
text this
test string
valueIfTrue string
리턴 string

IsEmpty() 공개 정적인 메소드

Determine is the string is null or empty.
public static IsEmpty ( this text ) : bool
text this
리턴 bool

IsLowerCamelCase() 공개 정적인 메소드

public static IsLowerCamelCase ( this text ) : bool
text this
리턴 bool

IsNotEmpty() 공개 정적인 메소드

Determine is the string is NOT null or empty.
public static IsNotEmpty ( this text ) : bool
text this
리턴 bool

Join() 공개 정적인 메소드

public static Join ( this items ) : string
items this
리턴 string

Join() 공개 정적인 메소드

public static Join ( this items, string separator ) : string
items this
separator string
리턴 string

Join() 공개 정적인 메소드

Join the items together
public static Join ( this items, string separator, string template ) : string
items this The items to join.
separator string The separator.
template string The template to format the items with.
리턴 string

LeftOf() 공개 정적인 메소드

Left of the first occurance of c
public static LeftOf ( this text, char c ) : string
text this
c char
리턴 string

LeftOf() 공개 정적인 메소드

Left of the n'th occurance of c
public static LeftOf ( this text, char c, int n ) : string
text this
c char
n int
리턴 string

LeftOf() 공개 정적인 메소드

Left of the first occurance of text
public static LeftOf ( this text, string value ) : string
text this
value string
리턴 string

LeftOfRightmostOf() 공개 정적인 메소드

public static LeftOfRightmostOf ( this text, char c ) : string
text this
c char
리턴 string

LeftOfRightmostOf() 공개 정적인 메소드

public static LeftOfRightmostOf ( this text, string value ) : string
text this
value string
리턴 string

PadLeft() 공개 정적인 메소드

Pad the left side of a string with characters to make the total length.
public static PadLeft ( this text, char c, Int32 totalLength ) : string
text this
c char
totalLength System.Int32
리턴 string

PadRight() 공개 정적인 메소드

Pad the right side of a string with a '0' if a single character.
public static PadRight ( this text ) : string
text this
리턴 string

PadRight() 공개 정적인 메소드

Pad the right side of a string with characters to make the total length.
public static PadRight ( this text, char c, Int32 totalLength ) : string
text this
c char
totalLength System.Int32
리턴 string

Randomize() 공개 정적인 메소드

public static Randomize ( this chars ) : string
chars this
리턴 string

Randomize() 공개 정적인 메소드

Generate a random string of character at a certain length
public static Randomize ( this chars, int length ) : string
chars this The Characters to use in the random string
length int The length of the random string
리턴 string

ReplaceLastInstanceOf() 공개 정적인 메소드

public static ReplaceLastInstanceOf ( this text, string oldValue, string newValue ) : string
text this
oldValue string
newValue string
리턴 string

RightOf() 공개 정적인 메소드

Right of the first occurance of c
public static RightOf ( this text, char c ) : string
text this
c char
리턴 string

RightOf() 공개 정적인 메소드

Right of the n'th occurance of c
public static RightOf ( this text, char c, int n ) : string
text this
c char
n int
리턴 string

RightOf() 공개 정적인 메소드

Right of the first occurance of text
public static RightOf ( this text, string value ) : string
text this
value string
리턴 string

RightOf() 공개 정적인 메소드

Right of the n'th occurance of c
public static RightOf ( this text, string c, int n ) : string
text this
c string
n int
리턴 string

RightOfRightmostOf() 공개 정적인 메소드

public static RightOfRightmostOf ( this text, char c ) : string
text this
c char
리턴 string

RightOfRightmostOf() 공개 정적인 메소드

public static RightOfRightmostOf ( this text, string value ) : string
text this
value string
리턴 string

Test() 공개 정적인 메소드

public static Test ( this text, string pattern ) : bool
text this
pattern string
리턴 bool

Test() 공개 정적인 메소드

public static Test ( this text, string pattern, RegexOptions options ) : bool
text this
pattern string
options RegexOptions
리턴 bool

ToCamelCase() 공개 정적인 메소드

public static ToCamelCase ( this text ) : string
text this
리턴 string

ToCamelCase() 공개 정적인 메소드

public static ToCamelCase ( this values, string separator ) : string
values this
separator string
리턴 string

ToCharacterSeparatedFileName() 공개 정적인 메소드

Accepts a string like "ArrowRotateClockwise" and returns "arrow_rotate_clockwise.png".
public static ToCharacterSeparatedFileName ( this name, char separator, string extension ) : string
name this
separator char
extension string
리턴 string

ToLowerCamelCase() 공개 정적인 메소드

public static ToLowerCamelCase ( this text ) : string
text this
리턴 string

ToMD5Hash() 공개 정적인 메소드

MD5Hash's a string.
public static ToMD5Hash ( this text ) : string
text this
리턴 string

ToTitleCase() 공개 정적인 메소드

Converts the first character of each word to Uppercase. Example: "the lazy dog" returns "The Lazy Dog"
public static ToTitleCase ( this text ) : string
text this The text to convert to sentence case
리턴 string

ToTitleCase() 공개 정적인 메소드

Converts the first character of each word to Uppercase. Example: "the lazy dog" returns "The Lazy Dog"
public static ToTitleCase ( this text, CultureInfo ci ) : string
text this The text to convert to sentence case
ci System.Globalization.CultureInfo
리턴 string

Wrap() 공개 정적인 메소드

public static Wrap ( this text, string wrapByText ) : string
text this
wrapByText string
리턴 string

Wrap() 공개 정적인 메소드

public static Wrap ( this text, string wrapStart, string wrapEnd ) : string
text this
wrapStart string
wrapEnd string
리턴 string