Home > Net >  Under the condition of without using a for loop cutting string into an array
Under the condition of without using a for loop cutting string into an array

Time:11-15

String A="asd1235ewew12121564r1fsa21f3s46wrwe56";
In the case of without using A for loop to A string cut into five characters into A set of strings, when the end does not satisfy the five end and remove,

CodePudding user response:

With regular, of course, want to go to baidu

CodePudding user response:

There was something wrong with loop?

CodePudding user response:

String aa="fsdfsdfdfsdfdsfsdfdses";
String [] array=Regex Matches (aa, @ \ w "{" + 5 +"} "). The Cast (). The Select (m=& gt; M.G roups [0]. Value). ToArray ();

CodePudding user response:

"Stick to, it doesn't prove anything,
It was trained how to turn end

Size=length/5

Write five substring

But there is no meaning, can write, can prove that sa, proof that the ans will break fingers count
?

CodePudding user response:

If similar rx

Rx buffer (5) written as may still have some practical significance, how he tells you how to respond, streaming

But not for simple requirements, except let programmers to prove he is 2 do not have what meaning

Not for? Why don't you do not, recursive. New a two-dimensional array directly, and then copy into not

But it can't prove what, can only say that some idle
  •  Tags:  
  • C#
  • Related