brain death

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • gonzosez

    #1

    brain death

    I need to break a string in to 70 char pieces.
    How can I do this?


  • Cor Ligthert [MVP]

    #2
    Re: brain death

    Gonzosez,

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

    I hope this helps,

    Cor

    "gonzosez" <adfschreef in bericht
    news:u$aZgaIwGH A.4688@TK2MSFTN GP06.phx.gbl...
    >I need to break a string in to 70 char pieces.
    How can I do this?
    >

    Comment

    • sweet_dreams

      #3
      Re: brain death


      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

      Comment

      • sweet_dreams

        #4
        Re: brain death


        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

        Comment

        • Dennis

          #5
          Re: brain death

          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


          "sweet_drea ms" 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
          >
          >

          Comment

          Working...