Splitting string into pairs with c#

前端 未结 6 439
后悔当初
后悔当初 2021-01-28 01:26

Is there a way to break a string into pairs without looking at indexes? e.g. TVBMCVTVFGTVTB would be broken into a list of strings as such:

[TV,BM,CV,TV,FG,TV,TB]

<
6条回答
  •  北恋
    北恋 (楼主)
    2021-01-28 01:52

    Convert the string into a char array and then iterate along that making new strings out of pairs of characters.

提交回复
热议问题