Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Dividing a string into multiple strings

$
0
0
I have made a code to divide a string from a richtextbox to multiple variables each of them contains only two characters, then to do a certain operation on each variable and then rejoins the multiple strings to another richtextbox after doing the operation on each substrings. I have tried the following but it seems there is a problem:

 Dim twoLetterWords = "The quick fox jumped over the lazy dog".
           Select(Function(c, i) New With {.Char = c, .Index = i}).
           GroupBy(Function(x) CInt(Math.Floor(x.Index / 2))).
           Select(Function(g) String.Join("", g.Select(Function(x) x.Char)))


But it doesn't work.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>