C# Class fastCSharp.unsafer.String

字符串相关操作(非安全,请自行确保数据可靠性)
显示文件 Open project: iLanceS/fastCSharp

Public Methods

Method Description
AsciiCount ( char* start, char* end, byte* valueMap ) : int

字符查找

ConcatBytes ( ) : byte[]

获取Ascii字符串原始字节流

Count ( char* start, char* end, char value ) : int

获取字符数量

EqualCase ( char* left, char* right, int count ) : bool

比较字符串(忽略大小写)

Find ( char* start, char* end, char value ) : char*

字符查找

FindAscii ( char* start, char* end, byte* valueMap ) : char*

字符查找

Replace ( string value, char oldChar, char newChar ) : string

字符替换

Serialize ( string value ) : byte[]

获取字符串原始字节流

Serialize ( string value, byte* write ) : int

获取字符串原始字节流

ToLower ( char* start, char* end ) : void

大写转小写

ToLower ( char* start, char* end, byte* write ) : void

大写转小写

ToUpper ( char* start, char* end ) : void

小写转大写

Private Methods

Method Description
AsciiCount ( char* start, char* end, fastCSharp.String.asciiMap valueMap ) : int
Copy ( string source, Array destination, int destinationIndex ) : void
Copy ( string source, int sourceIndex, Array destination, int destinationIndex, int count ) : void
Copy ( string source, string destination, int destinationIndex ) : void
Copy ( string source, void* destination ) : void
EqualCase ( string left, char* right, int count ) : bool
Find ( char* start, char* end, fastCSharp.String.asciiMap valueMap ) : char*
FindLastNot ( char* start, char* end, fastCSharp.String.asciiMap valueMap ) : char*
FindNot ( char* start, char* end, fastCSharp.String.asciiMap valueMap ) : char*
GetBytes ( char* value, int length ) : byte[]
Last ( string value ) : char
LowerEqualCase ( string left, string right, int count ) : bool
SimpleCopy ( string source, void* destination ) : void
SimpleEqual ( string source, void* destination ) : bool
UnsafeSimpleCopy ( string source, void* destination ) : void
WriteBytes ( char* value, int length, byte* write ) : void
findLastNotAscii ( char* start, char* end, byte* valueMap ) : char*

字符查找

findNotAscii ( char* start, char* end, byte* valueMap ) : char*

字符查找

Method Details

AsciiCount() public static method

字符查找
public static AsciiCount ( char* start, char* end, byte* valueMap ) : int
start char* 起始位置,不能为null
end char* 结束位置,不能为null
valueMap byte* 字符集合
return int

ConcatBytes() public static method

获取Ascii字符串原始字节流
public static ConcatBytes ( ) : byte[]
return byte[]

Count() public static method

获取字符数量
public static Count ( char* start, char* end, char value ) : int
start char* 起始位置,不能为null
end char* 结束位置,不能为null
value char
return int

EqualCase() public static method

比较字符串(忽略大小写)
public static EqualCase ( char* left, char* right, int count ) : bool
left char* 不能为null
right char* 不能为null
count int 字符数量,大于等于0
return bool

Find() public static method

字符查找
public static Find ( char* start, char* end, char value ) : char*
start char* 起始位置,不能为null
end char* 结束位置,不能为null
value char 查找值
return char*

FindAscii() public static method

字符查找
public static FindAscii ( char* start, char* end, byte* valueMap ) : char*
start char* 起始位置,不能为null
end char* 结束位置,不能为null
valueMap byte* 字符集合
return char*

Replace() public static method

字符替换
public static Replace ( string value, char oldChar, char newChar ) : string
value string 字符串,长度不能为0
oldChar char 原字符
newChar char 目标字符
return string

Serialize() public static method

获取字符串原始字节流
public static Serialize ( string value ) : byte[]
value string 字符串,不能为null
return byte[]

Serialize() public static method

获取字符串原始字节流
public static Serialize ( string value, byte* write ) : int
value string 字符串,不能为null
write byte* 写入位置,不能为null
return int

ToLower() public static method

大写转小写
public static ToLower ( char* start, char* end ) : void
start char* 起始位置,不能为null
end char* 结束位置,不能为null
return void

ToLower() public static method

大写转小写
public static ToLower ( char* start, char* end, byte* write ) : void
start char* 起始位置,不能为null
end char* 结束位置,不能为null
write byte* 写入位置,不能为null
return void

ToUpper() public static method

小写转大写
public static ToUpper ( char* start, char* end ) : void
start char* 起始位置,不能为null
end char* 结束位置,不能为null
return void