C# Class PeterO.DataUtilities

Contains methods useful for reading and writing strings. It is designed to have no dependencies other than the basic runtime class library.
Show file Open project: peteroupc/CBOR Class Usage Examples

Public Methods

Method Description
CodePointAt ( string str, int index ) : int
CodePointAt ( string str, int index, int surrogateBehavior ) : int
CodePointBefore ( string str, int index ) : int
CodePointBefore ( string str, int index, int surrogateBehavior ) : int
CodePointCompare ( string strA, string strB ) : int
GetUtf8Bytes ( string str, bool replace ) : byte[]
GetUtf8Bytes ( string str, bool replace, bool lenientLineBreaks ) : byte[]
GetUtf8Length ( string str, bool replace ) : long
GetUtf8String ( byte bytes, bool replace ) : string
GetUtf8String ( byte bytes, int offset, int bytesCount, bool replace ) : string
ReadUtf8 ( Stream stream, int bytesCount, StringBuilder builder, bool replace ) : int
ReadUtf8FromBytes ( byte data, int offset, int bytesCount, StringBuilder builder, bool replace ) : int
ReadUtf8ToString ( Stream stream ) : string
ReadUtf8ToString ( Stream stream, int bytesCount, bool replace ) : string
ToLowerCaseAscii ( string str ) : string
WriteUtf8 ( string str, Stream stream, bool replace ) : int
WriteUtf8 ( string str, int offset, int length, Stream stream, bool replace ) : int
WriteUtf8 ( string str, int offset, int length, Stream stream, bool replace, bool lenientLineBreaks ) : int

Method Details

CodePointAt() public static method

public static CodePointAt ( string str, int index ) : int
str string
index int
return int

CodePointAt() public static method

public static CodePointAt ( string str, int index, int surrogateBehavior ) : int
str string
index int
surrogateBehavior int
return int

CodePointBefore() public static method

public static CodePointBefore ( string str, int index ) : int
str string
index int
return int

CodePointBefore() public static method

public static CodePointBefore ( string str, int index, int surrogateBehavior ) : int
str string
index int
surrogateBehavior int
return int

CodePointCompare() public static method

public static CodePointCompare ( string strA, string strB ) : int
strA string
strB string
return int

GetUtf8Bytes() public static method

public static GetUtf8Bytes ( string str, bool replace ) : byte[]
str string
replace bool
return byte[]

GetUtf8Bytes() public static method

public static GetUtf8Bytes ( string str, bool replace, bool lenientLineBreaks ) : byte[]
str string
replace bool
lenientLineBreaks bool
return byte[]

GetUtf8Length() public static method

public static GetUtf8Length ( string str, bool replace ) : long
str string
replace bool
return long

GetUtf8String() public static method

public static GetUtf8String ( byte bytes, bool replace ) : string
bytes byte
replace bool
return string

GetUtf8String() public static method

public static GetUtf8String ( byte bytes, int offset, int bytesCount, bool replace ) : string
bytes byte
offset int
bytesCount int
replace bool
return string

ReadUtf8() public static method

public static ReadUtf8 ( Stream stream, int bytesCount, StringBuilder builder, bool replace ) : int
stream Stream
bytesCount int
builder StringBuilder
replace bool
return int

ReadUtf8FromBytes() public static method

public static ReadUtf8FromBytes ( byte data, int offset, int bytesCount, StringBuilder builder, bool replace ) : int
data byte
offset int
bytesCount int
builder StringBuilder
replace bool
return int

ReadUtf8ToString() public static method

public static ReadUtf8ToString ( Stream stream ) : string
stream Stream
return string

ReadUtf8ToString() public static method

public static ReadUtf8ToString ( Stream stream, int bytesCount, bool replace ) : string
stream Stream
bytesCount int
replace bool
return string

ToLowerCaseAscii() public static method

public static ToLowerCaseAscii ( string str ) : string
str string
return string

WriteUtf8() public static method

public static WriteUtf8 ( string str, Stream stream, bool replace ) : int
str string
stream Stream
replace bool
return int

WriteUtf8() public static method

public static WriteUtf8 ( string str, int offset, int length, Stream stream, bool replace ) : int
str string
offset int
length int
stream Stream
replace bool
return int

WriteUtf8() public static method

public static WriteUtf8 ( string str, int offset, int length, Stream stream, bool replace, bool lenientLineBreaks ) : int
str string
offset int
length int
stream Stream
replace bool
lenientLineBreaks bool
return int