Effective way of String spliting C#
- by openidsujoy
I have a completed string like this
N:Pay in Cash++RGI:40++R:200++T:Purchase++IP:N++IS:N++PD:PC++UCP:598.80++UPP:0.00++TCP:598.80++TPP:0.00++QE:1++QS:1++CPC:USD++PPC:Points++D:Y++E:Y++IFE:Y++AD:Y++IR:++MV:++CP:~ ~N:ERedemption++RGI:42++R:200++T:Purchase++IP:N++IS:N++PD:PC++UCP:598.80++UPP:0.00++TCP:598.80++TPP:0.00++QE:1++QS:1++CPC:USD++PPC:Points++D:Y++E:Y++IFE:Y++AD:Y++IR:++MV:++CP:
this string is like this
It's list of PO's(Payment Options) which are separated by ~~
this list may contains one or more
PO contains only Key-Value Pairs which separated by :
spaces are denoted by ++
I need to extract the values for Key "RGI" and "N".
I can do it via for loop , I want a efficient way to do this.
any help on this.