C# Class NSoft.NFramework.Tools.StringTool

显示文件 Open project: debop/NFramework Class Usage Examples

Public Properties

Property Type Description
DefaultEncoding System.Text.Encoding
MultiBytesPrefixBytes byte[]
NewLine string
WhiteSpaceChars char[]

Public Methods

Method Description
AsUnicode ( this c ) : string

Char를 Unicode char의 문자열로 표현합니다.

Base64Decode ( this s ) : byte[]

Base64형식으로 인코딩된 문자열을 디코딩하여 바이트 배열로 변환한다.

Base64Encode ( this inArray ) : string

Byte Array를 Base64형식의 문자열로 변환한다.

Base64Encode ( this s, Encoding enc ) : string

일반 문자열을 Base64 문자열로 만든다.

Base64Encode ( this inArray, char &outArray ) : void

Byte Array를 Base64 형식으로 Encoding 한다.

Between ( this text, string start, string end ) : string

대상문자열에서 첫번째 찾은 위치 ~ 두번째 찾은 위치 중간의 문자열을 반환한다.

Capitalize ( this s ) : string

문자열의 WORD 단위로 첫문자만 대문자로 만든다.

Compare ( this s1, string s2, bool ignoreCase = true, CultureInfo culture = null ) : int

문자열을 System.Globalization.CultureInfo.CurrentCulture를 이용하여 비교한다.

string.Compare 에 관련된 많은 함수들이 제공되므로 더 자세한 제어는 그 함수를 이용하세요.

Copy ( this source ) : string

원본 문자열과 같은 문자열을 생성합니다. 메모리 번지가 다른 인스턴스를 새로 만듭니다.

DeleteChar ( this s, char charArray ) : string

지정된 문자열에서 지정된 문자배열에 있는 문자들을 삭제한다.

DeleteCharAny ( this s ) : string

지정된 대상 문자열에서 지정된 문자들을 삭제한다.

EllipsisChar ( this text, int maxLength = 80 ) : string

문자열 최대크기만큼만 SubString을 수행하고, 문자열 마지막에 줄임표(...)를 붙인다.

EllipsisFirst ( this text, int maxLength = 80 ) : string

문자열 최대 크기만큼만 문자열 앞과 뒷 문장을 남기고, 중간에 줄임표(...)를 붙인다.

EllipsisPath ( this text, int maxLength = 80 ) : string

문자열 최대 크기만큼만 문자열 앞과 뒷 문장을 남기고, 중간에 줄임표(...)를 붙인다.

EqualTo ( this s1, string s2, bool ignoreCase = true, CultureInfo culture = null ) : bool

지정된 두 문자열이 같은지 검사합니다.

FirstOf ( this text, string c ) : string

첫번째 찾은 문자열 위치로부터 왼쪽에 있는 문자열을 반환

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

n 번째 찾은 문자열 위치로부터 왼쪽에 있는 문자열 반환

FirstOfLastIndexOf ( this text, string sub ) : string

대상문자열의 처음부터 ~ 뒤에서부터 찾은 위치 전까지의 문자열을 찾는다.

FormatWith ( this format ) : string

지정된 포맷 문자열을 이용하여, 서식 지정 문자열로 됩니다.

FormatWith ( this format, IFormatProvider provider ) : string

지정된 포맷 문자열을 이용하여, 서식 지정 문자열로 됩니다.

FormatWith ( this format, object arg0 ) : string

지정된 포맷 문자열을 이용하여, 서식 지정 문자열로 됩니다.

FormatWith ( this format, object arg0, object arg1 ) : string

지정된 포맷 문자열을 이용하여, 서식 지정 문자열로 됩니다.

GetFirstLine ( this text ) : string

지정된 문자열의 첫번째 라인의 문자열만 (개행문자는 제외하고) 추출한다.

GetLongestCommonSequence ( this str1, string str2, string &sequence ) : int

두 문자열의 최대 공통 문자열 (Longest common substring) 을 찾습니다. 공통된 부분이 없다면 sequence는 빈 문자열을 가집니다. 참고: http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Longest_common_substring

GetLongestCommonSubstring ( this str1, string str2, string &substring ) : int

두 문자열의 최대 공통 문자열 (Longest common substring) 을 찾습니다. 공통된 부분이 없다면 sequence는 빈 문자열을 가집니다. 참고: http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Longest_common_substring

GetString ( this enc, byte bytes ) : string
HighlightText ( this text, string searchWord, string>.Func highlightFunc ) : string

문자열에서 검색한 단어에 Highlight를 주는 함수입니다.

HighlightText ( this text, string searchWord, bool ignoreCase = true, string>.Func highlightFunc = null ) : string

문자열에서 검색한 단어에 Highlight를 주는 함수입니다.

IndexOfN ( this s, string sub, int nth, bool ignoreCase = true, CultureInfo culture = null ) : int

문자열에서 N 번째 찾을 sub string의 인덱스 (인덱스는 0부터 시작합니다.) 를 반환합니다.

IsEmpty ( this s, bool withTrim = false ) : bool

지정된 문자열이 Null이거나 Trim을 수행하여 길이가 0가 된 문자열인지 확인.

IsMultiByteString ( this bytes ) : bool

지정된 바이트 배열이 2-byte 문자열 정보인지 파악합니다. 선두의 3개의 요소가 MultiBytesPrefixBytes라면 2-byte 문자열입니다.

IsNotEmpty ( this s, bool withTrim = false ) : bool

지정된 문자열에 내용이 있으면 True, Null이거나 길이가 0인 문자열이면 False를 반환

IsNotNull ( this s ) : bool

지정된 문자열이 Null이 아닌지 확인

IsNotWhiteSpace ( this s ) : bool

문자열이 null이거나, 빈 문자열 또는 공백만 있는 문자열, \n, \r, \t, \f 같은 제어문자만 있는 문자열이라면 이라면 false를 반환한다.

IsNull ( this s ) : bool

지정된 문자열이 Null인지 확인

IsWhiteSpace ( this s ) : bool

문자열이 null이거나, 빈 문자열 또는 공백만 있는 문자열, \n, \r, \t, \f 같은 제어문자만 있는 문자열이라면 이라면 true를 반환한다.

Join ( this separator ) : string

문자열 배열을 구분자를 중간에 넣어서 결합시킨다. string.Join(string,string[]) 함수는 string[] 만을 인자로 받는다.

Join ( this strs, string separator ) : string

문자열 시퀀스를 구분자를 중간에 넣어서 결합시킨다.

LastChar ( this text ) : char

대상 문자열의 마지막 문자를 반환한다.

LastOf ( this text, string c ) : string

첫번째 찾은 위치의 오른쪽에 있는 문자열 반환

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

n 번째 찾은 문자열 위치로부터 오른쪽에 남은 문자열을 반환

LastOfLastIndexOfthis ( this text, string sub ) : string

대상문자열의 뒤부터 찾은 위치부터 마지막 문자까지

QuotedStr ( this s ) : string

지정된 문자열을 SQL 문법의 문자열에 맞게 홑따옴표 형식으로 바꾼다.

QuotedStr ( this s, string defaultStr ) : string

지정된 문자열을 SQL 문법의 문자열에 맞게 홑따옴표 형식으로 바꾼다. 지정된 문자열이 null이거나 빈 문자열이면 기본값의 홑따옴표 형식을 반환한다.

Replace ( this S, string oldPattern, string newPattern, bool ignoreCase = true, CultureInfo culture = null ) : string

원본 문자열에서 oldPattern에 해당하는 문자열을 newPattern의 문자열로 교체한다.

Replicate ( this s, int n ) : string

지정한 횟수만큼 문자 식을 반복합니다.

Reverse ( this s ) : string

문자열의 char 순서를 역순으로 변경한다.

Encoding 방법과 무관하게 실행되므로 한글등에서는 문제가 생길 수 있다.

Split ( this s ) : string[]

지정된 문자열을 구분자로 구분하여 문자열 배열을 만든다.

Split ( this s, StringSplitOptions splitOptions ) : string[]

지정된 문자열을 구분자로 구분하여 문자열 배열을 만든다.

Split ( this s, string pattern, bool ignoreCase = true, CultureInfo culture = null ) : string[]

지정된 문자열을 지정된 패턴을 구분자로 하여 문자열 배열로 만든다.

ToBytes ( this s ) : byte[]

문자열을 시스템 기본 인코딩 방식을 이용하여 Byte Array로 변환한다.

ToBytes ( this s, Encoding enc ) : byte[]

문자열을 주어진 인코딩 방식을 이용하여 Byte Array로 변환한다.

ToOracleNaming ( this s, string delimiter = "_" ) : string

Class나 Property의 Naming 방식인 Pascal Naming 또는 Camelcase Naming 방식의 문자열을 ORACLE Naming 방식의 문자열로 변환합니다.

ToStream ( this s ) : Stream

문자열을 기본 인코딩 방식으로 스트림 (System.IO.MemoryStream)의 인스턴스로 변환한다.

ToStream ( this s, Encoding enc ) : Stream

문자열을 스트림 (System.IO.MemoryStream)의 인스턴스로 변환한다.

사용하고 난 Stream 인스턴스 객체는 Close()를 호출하여 메모리에서 제거해야 한다.

ToStream ( this bytes, int index, int count ) : Stream

byte 배열을 stream으로 만듭니다.

ToString ( Stream stream ) : string

stream 내용을 읽어 문자열로 반환합니다.

ToString ( this bytes ) : string

Byte 배열을 시스템 기본 인코딩 방식의 문자열로 변환한다.

ToString ( this stream, Encoding enc ) : string

주어진 Stream 내용을 지정된 인코딩 방식으로 문자열로 변환한다.

ToString ( this bytes, Encoding enc, int index, int count ) : string

지정된 인코딩 방식으로 주어진 범위의 Byte 배열을 문자열로 변환한다.

ToString ( this bytes, int index, int count ) : string

Byte 배열의 지정된 범위를 기본 인코딩 방식의 문자열로 변환한다.

ToStringUnsafe ( this bytes ) : string

Unsafe 모드로 byte 배열을 문자열로 변환한다.

Managed 함수보다 2배정도 빠르다. Network 같은데서 사용하기 좋다.

ToText ( this stream ) : string

stream 내용을 읽어 문자열로 반환합니다.

ToText ( this s, Encoding enc ) : string
ToText ( this stream, int length ) : string

stream 내용의 일부분을 읽어 문자열로 반환합니다.

ToText ( this bytes, int index, int count ) : string

Byte 배열의 지정된 범위를 기본 인코딩 방식의 문자열로 변환한다.

ToText ( this bytes, int index, int count, Encoding enc ) : string

지정된 인코딩 방식으로 주어진 범위의 Byte 배열을 문자열로 변환한다.

ToTextUnsafe ( this bytes ) : string

Unsafe 모드로 byte 배열을 문자열로 변환한다.

Managed 함수보다 2배정도 빠르다. Network 같은데서 사용하기 좋다.

ToTextUnsafe ( this bytes, Encoding encoding ) : string

Unsafe 모드로 byte 배열을 문자열로 변환한다.

Managed 함수보다 2배정도 빠르다. Network 같은데서 사용하기 좋다.

Utf8Decode ( this s ) : string

UTF8 형식의 문자열을 시스템 기본 인코딩 (System.Text.Encoding.Default) 방식으로 변환한다.

Utf8Encode ( this s ) : string

해당 문자열을 UTF8 (RwConsts.XmlEncoding) 방식으로 변환한다.

WhiteSpaceAsNull ( this text ) : string

null 이거나 빈 문자열인 경우에는 null을 반환합니다.

WordCount ( string s ) : int

지정된 문자열에 지정된 문자들의 갯수를 구한다.

WordCount ( string text, string pattern, bool ignoreCase = true, CultureInfo culture = null ) : int

지정된 문자열에 지정된 패턴이 검색되는 횟수를 반환한다.

WriteCharAsUnicode ( TextWriter writer, char c ) : void

지정한 char 의 unicode string을 writer에 쓴다.

Private Methods

Method Description
GetLongestCommonSequenceInternal ( string str1, string str2, int &matrix ) : int
NeedEllipsis ( this text, int maxLength ) : bool

문자열 축약이 필요한지 검사한다

ReadLongestCommonSequenceFromBacktrack ( int backtrack, string str1, string str2, int position1, int position2 ) : StringBuilder

Method Details

AsUnicode() public static method

Char를 Unicode char의 문자열로 표현합니다.
public static AsUnicode ( this c ) : string
c this
return string

Base64Decode() public static method

Base64형식으로 인코딩된 문자열을 디코딩하여 바이트 배열로 변환한다.
public static Base64Decode ( this s ) : byte[]
s this Base64형식으로 인코딩된 문자열
return byte[]

Base64Encode() public static method

Byte Array를 Base64형식의 문자열로 변환한다.
public static Base64Encode ( this inArray ) : string
inArray this 바이트 배열
return string

Base64Encode() public static method

일반 문자열을 Base64 문자열로 만든다.
public static Base64Encode ( this s, Encoding enc ) : string
s this
enc System.Text.Encoding
return string

Base64Encode() public static method

Byte Array를 Base64 형식으로 Encoding 한다.
public static Base64Encode ( this inArray, char &outArray ) : void
inArray this
outArray char
return void

Between() public static method

대상문자열에서 첫번째 찾은 위치 ~ 두번째 찾은 위치 중간의 문자열을 반환한다.
public static Between ( this text, string start, string end ) : string
text this 대상 문자열
start string 첫번째 찾을 문자열
end string 두번째 찾을 문자열
return string

Capitalize() public static method

문자열의 WORD 단위로 첫문자만 대문자로 만든다.
public static Capitalize ( this s ) : string
s this
return string

Compare() public static method

문자열을 System.Globalization.CultureInfo.CurrentCulture를 이용하여 비교한다.
string.Compare 에 관련된 많은 함수들이 제공되므로 더 자세한 제어는 그 함수를 이용하세요.
public static Compare ( this s1, string s2, bool ignoreCase = true, CultureInfo culture = null ) : int
s1 this 비교 문자열 1
s2 string 비교 문자열 2
ignoreCase bool 대소문자 구분 여부
culture CultureInfo 문화권
return int

Copy() public static method

원본 문자열과 같은 문자열을 생성합니다. 메모리 번지가 다른 인스턴스를 새로 만듭니다.
public static Copy ( this source ) : string
source this
return string

DeleteChar() public static method

지정된 문자열에서 지정된 문자배열에 있는 문자들을 삭제한다.
public static DeleteChar ( this s, char charArray ) : string
s this 대상 문자열
charArray char 삭제할 문자들
return string

DeleteCharAny() public static method

지정된 대상 문자열에서 지정된 문자들을 삭제한다.
public static DeleteCharAny ( this s ) : string
s this 대상 문자열
return string

EllipsisChar() public static method

문자열 최대크기만큼만 SubString을 수행하고, 문자열 마지막에 줄임표(...)를 붙인다.
public static EllipsisChar ( this text, int maxLength = 80 ) : string
text this 트리밍할 문자열
maxLength int 트리밍의 최대 크기
return string

EllipsisFirst() public static method

문자열 최대 크기만큼만 문자열 앞과 뒷 문장을 남기고, 중간에 줄임표(...)를 붙인다.
public static EllipsisFirst ( this text, int maxLength = 80 ) : string
text this 트리밍할 문자열
maxLength int 트리밍의 최대 크기
return string

EllipsisPath() public static method

문자열 최대 크기만큼만 문자열 앞과 뒷 문장을 남기고, 중간에 줄임표(...)를 붙인다.
public static EllipsisPath ( this text, int maxLength = 80 ) : string
text this 트리밍할 문자열
maxLength int 트리밍의 최대 크기
return string

EqualTo() public static method

지정된 두 문자열이 같은지 검사합니다.
public static EqualTo ( this s1, string s2, bool ignoreCase = true, CultureInfo culture = null ) : bool
s1 this
s2 string
ignoreCase bool 대소문자 구분
culture CultureInfo 문화권
return bool

FirstOf() public static method

첫번째 찾은 문자열 위치로부터 왼쪽에 있는 문자열을 반환
public static FirstOf ( this text, string c ) : string
text this 대상 문자열
c string 찾을 문자열
return string

FirstOf() public static method

n 번째 찾은 문자열 위치로부터 왼쪽에 있는 문자열 반환
public static FirstOf ( this text, string c, int n ) : string
text this 대상 문자열
c string 찾을 문자열
n int 찾는 횟수
return string

FirstOfLastIndexOf() public static method

대상문자열의 처음부터 ~ 뒤에서부터 찾은 위치 전까지의 문자열을 찾는다.
public static FirstOfLastIndexOf ( this text, string sub ) : string
text this 대상 문자열
sub string 찾을 문자열
return string

FormatWith() public static method

지정된 포맷 문자열을 이용하여, 서식 지정 문자열로 됩니다.
public static FormatWith ( this format ) : string
format this
return string

FormatWith() public static method

지정된 포맷 문자열을 이용하여, 서식 지정 문자열로 됩니다.
public static FormatWith ( this format, IFormatProvider provider ) : string
format this
provider IFormatProvider
return string

FormatWith() public static method

지정된 포맷 문자열을 이용하여, 서식 지정 문자열로 됩니다.
public static FormatWith ( this format, object arg0 ) : string
format this
arg0 object
return string

FormatWith() public static method

지정된 포맷 문자열을 이용하여, 서식 지정 문자열로 됩니다.
public static FormatWith ( this format, object arg0, object arg1 ) : string
format this
arg0 object
arg1 object
return string

GetFirstLine() public static method

지정된 문자열의 첫번째 라인의 문자열만 (개행문자는 제외하고) 추출한다.
public static GetFirstLine ( this text ) : string
text this
return string

GetLongestCommonSequence() public static method

두 문자열의 최대 공통 문자열 (Longest common substring) 을 찾습니다. 공통된 부분이 없다면 sequence는 빈 문자열을 가집니다. 참고: http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Longest_common_substring
public static GetLongestCommonSequence ( this str1, string str2, string &sequence ) : int
str1 this
str2 string
sequence string
return int

GetLongestCommonSubstring() public static method

두 문자열의 최대 공통 문자열 (Longest common substring) 을 찾습니다. 공통된 부분이 없다면 sequence는 빈 문자열을 가집니다. 참고: http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Longest_common_substring
public static GetLongestCommonSubstring ( this str1, string str2, string &substring ) : int
str1 this
str2 string
substring string
return int

GetString() public static method

public static GetString ( this enc, byte bytes ) : string
enc this
bytes byte
return string

HighlightText() public static method

문자열에서 검색한 단어에 Highlight를 주는 함수입니다.
public static HighlightText ( this text, string searchWord, string>.Func highlightFunc ) : string
text this 검색 대상 문자열
searchWord string 검색할 단어
highlightFunc string>.Func 검색된 문자를 Highlight 하는 함수
return string

HighlightText() public static method

문자열에서 검색한 단어에 Highlight를 주는 함수입니다.
public static HighlightText ( this text, string searchWord, bool ignoreCase = true, string>.Func highlightFunc = null ) : string
text this 검색 대상 문자열
searchWord string 검색할 단어
ignoreCase bool 검색 시 대소문자 구분 여부(기본은 True)
highlightFunc string>.Func 검색된 문자를 Highlight 하는 함수
return string

IndexOfN() public static method

문자열에서 N 번째 찾을 sub string의 인덱스 (인덱스는 0부터 시작합니다.) 를 반환합니다.
public static IndexOfN ( this s, string sub, int nth, bool ignoreCase = true, CultureInfo culture = null ) : int
s this 원본 문자열
sub string 찾을 문자열
nth int nth 번째 검색
ignoreCase bool 대소문자 구분 여부
culture CultureInfo 문화권
return int

IsEmpty() public static method

지정된 문자열이 Null이거나 Trim을 수행하여 길이가 0가 된 문자열인지 확인.
public static IsEmpty ( this s, bool withTrim = false ) : bool
s this 검사할 문자열
withTrim bool 문자열을 Trim후에 길이 검사를 할 것인지 여부
return bool

IsMultiByteString() public static method

지정된 바이트 배열이 2-byte 문자열 정보인지 파악합니다. 선두의 3개의 요소가 MultiBytesPrefixBytes라면 2-byte 문자열입니다.
public static IsMultiByteString ( this bytes ) : bool
bytes this
return bool

IsNotEmpty() public static method

지정된 문자열에 내용이 있으면 True, Null이거나 길이가 0인 문자열이면 False를 반환
public static IsNotEmpty ( this s, bool withTrim = false ) : bool
s this 검사할 문자열
withTrim bool 공백 제거 여부
return bool

IsNotNull() public static method

지정된 문자열이 Null이 아닌지 확인
public static IsNotNull ( this s ) : bool
s this
return bool

IsNotWhiteSpace() public static method

문자열이 null이거나, 빈 문자열 또는 공백만 있는 문자열, \n, \r, \t, \f 같은 제어문자만 있는 문자열이라면 이라면 false를 반환한다.
public static IsNotWhiteSpace ( this s ) : bool
s this 검사할 문자열
return bool

IsNull() public static method

지정된 문자열이 Null인지 확인
public static IsNull ( this s ) : bool
s this 검사할 문자열
return bool

IsWhiteSpace() public static method

문자열이 null이거나, 빈 문자열 또는 공백만 있는 문자열, \n, \r, \t, \f 같은 제어문자만 있는 문자열이라면 이라면 true를 반환한다.
public static IsWhiteSpace ( this s ) : bool
s this 검사할 문자열
return bool

Join() public static method

문자열 배열을 구분자를 중간에 넣어서 결합시킨다. string.Join(string,string[]) 함수는 string[] 만을 인자로 받는다.
public static Join ( this separator ) : string
separator this 문장 구분자
return string

Join() public static method

문자열 시퀀스를 구분자를 중간에 넣어서 결합시킨다.
public static Join ( this strs, string separator ) : string
strs this
separator string
return string

LastChar() public static method

대상 문자열의 마지막 문자를 반환한다.
public static LastChar ( this text ) : char
text this 대상 문자열
return char

LastOf() public static method

첫번째 찾은 위치의 오른쪽에 있는 문자열 반환
public static LastOf ( this text, string c ) : string
text this 대상 문자열
c string 찾을 문자열
return string

LastOf() public static method

n 번째 찾은 문자열 위치로부터 오른쪽에 남은 문자열을 반환
public static LastOf ( this text, string c, int n ) : string
text this 대상 문자열
c string 찾을 문자열
n int 찾는 횟수
return string

LastOfLastIndexOfthis() public static method

대상문자열의 뒤부터 찾은 위치부터 마지막 문자까지
public static LastOfLastIndexOfthis ( this text, string sub ) : string
text this 대상 문자열
sub string 찾을 문자열
return string

QuotedStr() public static method

지정된 문자열을 SQL 문법의 문자열에 맞게 홑따옴표 형식으로 바꾼다.
public static QuotedStr ( this s ) : string
s this
return string

QuotedStr() public static method

지정된 문자열을 SQL 문법의 문자열에 맞게 홑따옴표 형식으로 바꾼다. 지정된 문자열이 null이거나 빈 문자열이면 기본값의 홑따옴표 형식을 반환한다.
public static QuotedStr ( this s, string defaultStr ) : string
s this
defaultStr string
return string

Replace() public static method

원본 문자열에서 oldPattern에 해당하는 문자열을 newPattern의 문자열로 교체한다.
public static Replace ( this S, string oldPattern, string newPattern, bool ignoreCase = true, CultureInfo culture = null ) : string
S this 원본 문자열
oldPattern string 바뀔 문자열
newPattern string 새로운 문자열
ignoreCase bool 대소문자 구분 여부
culture CultureInfo CultureInfo
return string

Replicate() public static method

지정한 횟수만큼 문자 식을 반복합니다.
public static Replicate ( this s, int n ) : string
s this 문자식
n int 반복 횟수
return string

Reverse() public static method

문자열의 char 순서를 역순으로 변경한다.
Encoding 방법과 무관하게 실행되므로 한글등에서는 문제가 생길 수 있다.
public static Reverse ( this s ) : string
s this 대상 문자열
return string

Split() public static method

지정된 문자열을 구분자로 구분하여 문자열 배열을 만든다.
public static Split ( this s ) : string[]
s this 대상 문자열
return string[]

Split() public static method

지정된 문자열을 구분자로 구분하여 문자열 배열을 만든다.
public static Split ( this s, StringSplitOptions splitOptions ) : string[]
s this 대상 문자열
splitOptions StringSplitOptions Split 시 옵션
return string[]

Split() public static method

지정된 문자열을 지정된 패턴을 구분자로 하여 문자열 배열로 만든다.
public static Split ( this s, string pattern, bool ignoreCase = true, CultureInfo culture = null ) : string[]
s this 대상 문자열
pattern string 구분할 문자열
ignoreCase bool 대소문자 구분 여부
culture CultureInfo CultureInfo
return string[]

ToBytes() public static method

문자열을 시스템 기본 인코딩 방식을 이용하여 Byte Array로 변환한다.
public static ToBytes ( this s ) : byte[]
s this 대상문자열
return byte[]

ToBytes() public static method

문자열을 주어진 인코딩 방식을 이용하여 Byte Array로 변환한다.
public static ToBytes ( this s, Encoding enc ) : byte[]
s this 변환할 문자열
enc Encoding 인코딩 방식
return byte[]

ToOracleNaming() public static method

Class나 Property의 Naming 방식인 Pascal Naming 또는 Camelcase Naming 방식의 문자열을 ORACLE Naming 방식의 문자열로 변환합니다.
public static ToOracleNaming ( this s, string delimiter = "_" ) : string
s this 변환할 문자열
delimiter string 단어 사이의 구분자 (기본값은 '_')
return string

ToStream() public static method

문자열을 기본 인코딩 방식으로 스트림 (System.IO.MemoryStream)의 인스턴스로 변환한다.
public static ToStream ( this s ) : Stream
s this 대상문자열
return Stream

ToStream() public static method

문자열을 스트림 (System.IO.MemoryStream)의 인스턴스로 변환한다.
사용하고 난 Stream 인스턴스 객체는 Close()를 호출하여 메모리에서 제거해야 한다.
public static ToStream ( this s, Encoding enc ) : Stream
s this 대상 문자열
enc Encoding 인코딩 형식
return Stream

ToStream() public static method

byte 배열을 stream으로 만듭니다.
public static ToStream ( this bytes, int index, int count ) : Stream
bytes this byte 배열
index int 시작 인덱스
count int 크기
return Stream

ToString() public static method

stream 내용을 읽어 문자열로 반환합니다.
public static ToString ( Stream stream ) : string
stream Stream 읽을 스트림
return string

ToString() public static method

Byte 배열을 시스템 기본 인코딩 방식의 문자열로 변환한다.
public static ToString ( this bytes ) : string
bytes this 원본 바이트 배열
return string

ToString() public static method

주어진 Stream 내용을 지정된 인코딩 방식으로 문자열로 변환한다.
public static ToString ( this stream, Encoding enc ) : string
stream this
enc Encoding
return string

ToString() public static method

지정된 인코딩 방식으로 주어진 범위의 Byte 배열을 문자열로 변환한다.
public static ToString ( this bytes, Encoding enc, int index, int count ) : string
bytes this 원본 바이트 배열
enc Encoding 인코딩 방식
index int 시작 위치
count int 변환할 갯수
return string

ToString() public static method

Byte 배열의 지정된 범위를 기본 인코딩 방식의 문자열로 변환한다.
public static ToString ( this bytes, int index, int count ) : string
bytes this 원본 바이트 배열
index int 시작 위치
count int 범위
return string

ToStringUnsafe() public static method

Unsafe 모드로 byte 배열을 문자열로 변환한다.
Managed 함수보다 2배정도 빠르다. Network 같은데서 사용하기 좋다.
public static ToStringUnsafe ( this bytes ) : string
bytes this 원본 바이트 배열
return string

ToText() public static method

stream 내용을 읽어 문자열로 반환합니다.
public static ToText ( this stream ) : string
stream this 문자열로 바꿀 스트림
return string

ToText() public static method

public static ToText ( this s, Encoding enc ) : string
s this
enc Encoding
return string

ToText() public static method

stream 내용의 일부분을 읽어 문자열로 반환합니다.
public static ToText ( this stream, int length ) : string
stream this
length int
return string

ToText() public static method

Byte 배열의 지정된 범위를 기본 인코딩 방식의 문자열로 변환한다.
public static ToText ( this bytes, int index, int count ) : string
bytes this 원본 바이트 배열
index int 시작 위치
count int 범위
return string

ToText() public static method

지정된 인코딩 방식으로 주어진 범위의 Byte 배열을 문자열로 변환한다.
public static ToText ( this bytes, int index, int count, Encoding enc ) : string
bytes this 원본 바이트 배열
index int 시작 위치
count int 변환할 갯수
enc Encoding 인코딩 방식
return string

ToTextUnsafe() public static method

Unsafe 모드로 byte 배열을 문자열로 변환한다.
Managed 함수보다 2배정도 빠르다. Network 같은데서 사용하기 좋다.
public static ToTextUnsafe ( this bytes ) : string
bytes this 원본 바이트 배열
return string

ToTextUnsafe() public static method

Unsafe 모드로 byte 배열을 문자열로 변환한다.
Managed 함수보다 2배정도 빠르다. Network 같은데서 사용하기 좋다.
public static ToTextUnsafe ( this bytes, Encoding encoding ) : string
bytes this 원본 바이트 배열
encoding Encoding 인코딩 방식
return string

Utf8Decode() public static method

UTF8 형식의 문자열을 시스템 기본 인코딩 (System.Text.Encoding.Default) 방식으로 변환한다.
public static Utf8Decode ( this s ) : string
s this 원본 문자열
return string

Utf8Encode() public static method

해당 문자열을 UTF8 (RwConsts.XmlEncoding) 방식으로 변환한다.
public static Utf8Encode ( this s ) : string
s this 원본 문자열
return string

WhiteSpaceAsNull() public static method

null 이거나 빈 문자열인 경우에는 null을 반환합니다.
public static WhiteSpaceAsNull ( this text ) : string
text this
return string

WordCount() public static method

지정된 문자열에 지정된 문자들의 갯수를 구한다.
public static WordCount ( string s ) : int
s string 대상 문자열
return int

WordCount() public static method

지정된 문자열에 지정된 패턴이 검색되는 횟수를 반환한다.
public static WordCount ( string text, string pattern, bool ignoreCase = true, CultureInfo culture = null ) : int
text string 대상 문자열
pattern string 검색 문자열 패턴
ignoreCase bool 대소문자 구분 여부
culture CultureInfo 특정 CultureInfo
return int

WriteCharAsUnicode() public static method

지정한 char 의 unicode string을 writer에 쓴다.
public static WriteCharAsUnicode ( TextWriter writer, char c ) : void
writer TextWriter
c char
return void

Property Details

DefaultEncoding public_oe static_oe property

Default Encoding (Encoding.Default) 를 나타낸다.
public static Encoding,System.Text DefaultEncoding
return System.Text.Encoding

MultiBytesPrefixBytes public_oe static_oe property

MultiByte 언어를 Stream 으로 변환 시에, MultiByte 임을 나타내는 Byte 접두사 (0xEF, 0xBB, 0xBF), FusionCharts에서도 이 bytes 가 쓰인다.
public static byte[] MultiBytesPrefixBytes
return byte[]

NewLine public_oe static_oe property

시스템 개행 문자
public static string NewLine
return string

WhiteSpaceChars public_oe static_oe property

문자열에서 공백과 같이 취급되는 제어 문자들 (개행문자, 탭, 라인피드 등)
public static char[] WhiteSpaceChars
return char[]