Home All Groups Group Topic Archive Search About
Author
15 Aug 2006 4:21 PM
gonzosez
I need to break a string in to 70 char pieces.
How can I do this?

Author
15 Aug 2006 4:54 PM
Cor Ligthert [MVP]
Gonzosez,

dim mystring as string = "I contain 70 characters"
dim firstchar as Char = mystring(0)

I hope this helps,

Cor

Show quoteHide quote
"gonzosez" <adf> schreef in bericht
news:u$aZgaIwGHA.4688@TK2MSFTNGP06.phx.gbl...
>I need to break a string in to 70 char pieces.
> How can I do this?
>
Author
15 Aug 2006 4:58 PM
sweet_dreams
gonzosez napisal(a):
> I need to break a string in to 70 char pieces.
> How can I do this?

You can use Substring or Split method. Read about them in MSDN.

Regards,
sweet_dreams
Author
15 Aug 2006 5:01 PM
sweet_dreams
gonzosez napisal(a):
> I need to break a string in to 70 char pieces.
> How can I do this?

I don't get what you mean, but may be you will find helpful Substring
or Split methods. More in MSDN.

Regards,
sweet_dreams
Author
15 Aug 2006 11:29 PM
Dennis
This will break your string up into individual character and put them into an
array.  If you have a 70 char string, you will get arr.length=70 but if you
have a 60 char string, you will get arr.length = 60.  Not sure if this is
what you wanted.

Dim str As String = "012wxyz789"
Dim arr() As Char
arr = str.ToCharArray(3, 4)

--
Dennis in Houston


Show quoteHide quote
"sweet_dreams" wrote:

>
> gonzosez napisal(a):
> > I need to break a string in to 70 char pieces.
> > How can I do this?
>
> I don't get what you mean, but may be you will find helpful Substring
> or Split methods. More in MSDN.
>
> Regards,
> sweet_dreams
>
>