vb.net - RichTextbox text into array per 255 char -


I want to divide 255 letters in RichTextBox into arrays in vb 2010

Example There are 300 characters in rich textbox: array [0] = '1 - 255 character array [1] =' 256 - 300 char

I new to VB and I can not find any decent link or site Thanks in advance for the help.

There are several ways to do this privately, I have a string list (string K) This is easy to find and you can easily convert it to an array.

  'If you want only one collection list (string), then list (string) = splitStringIntoList (RichTextBox.text, 255)' as the result or if you only have a string array Dim resultArray want string () = SplitStringIntoList (RichTextBox.text, 255) .OARRA public function splitStringIntoList (as string, as valve lens integer) as list (in the form of a string) slow splitlist Do the new list (as a string) while instring.Length & gt; 0 if instring.Length & lt; Len then 'the remaining string is too low, so at least lane len = instring.Length end if splitlist.Add (instring.Substring (0, Lane)) instring = instring.Substring (len) loop return splitlist end function    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -