C# Class Tup.Cobar4Net.Parser.Util.PairUtil

Exibir arquivo Open project: tupunco/Tup.Cobar4Net Class Usage Examples

Public Methods

Method Description
SequenceSlicing ( string slice ) : int>.Pair

"2" -> (0,2)
"1:2" -> (1,2)
"1:" -> (1,0)
"-1:" -> (-1,0)
":-1" -> (0,-1)
":" -> (0,0)

SplitIndex ( string src, char l, char r ) : int>.Pair

 将名字和索引用进行分 当src = "offer_group[4]", l='[', r=']'时, 返回的Piar  ("offer", 4); 当src = "offer_group", l='[', r=']'时, 返回Pair("offer",-1); 

Method Details

SequenceSlicing() public static method

"2" -> (0,2)
"1:2" -> (1,2)
"1:" -> (1,0)
"-1:" -> (-1,0)
":-1" -> (0,-1)
":" -> (0,0)
public static SequenceSlicing ( string slice ) : int>.Pair
slice string
return int>.Pair

SplitIndex() public static method

 将名字和索引用进行分 当src = "offer_group[4]", l='[', r=']'时, 返回的Piar  ("offer", 4); 当src = "offer_group", l='[', r=']'时, 返回Pair("offer",-1); 
public static SplitIndex ( string src, char l, char r ) : int>.Pair
src string
l char
r char
return int>.Pair