+ Reply to Thread
Results 1 to 3 of 3

Thread: How to split this string?

  1. #1
    Junior Member
    Join Date
    Aug 2006
    Age
    31
    Posts
    7
    Rep Power
    7

    Exclamation How to split this string?

    HI,
    I attended one written test.and one question was there

    split and display using split function

    string is
    c:\myfolder\yourfolder\all.exe

    here ,we have to split with slash character,i tried it is working with comman,dot but not able do with slash.



    hope any one will send the code
    thanks and regards

  2. #2
    Unregistered
    Unregistered

    Re: How to split this string?

    you have to user "\\" instead of "\" while using split method

  3. #3
    Junior Member
    Join Date
    Sep 2006
    Age
    32
    Posts
    3
    Rep Power
    7

    Re: How to split this string?

    Hi
    This is the way to solve your problem

    Module Module1
    Sub Main()
    Dim s As String = "c:\myfolder\yourfolder\all.exe"
    Dim sarr() As String
    sarr = s.Split("\\")
    Dim i As Integer
    For i = 0 To sarr.GetUpperBound(0)
    Console.Write(sarr(i) & vbCrLf)
    Next
    Console.Read()
    End Sub
    End Module

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. interview Q&A asked in winrunner
    By Spoorthi in forum Testing Tools & QA
    Replies: 80
    Last Post: 22-11-08, 11:48 PM
  2. string routines for 2 byte word.
    By SuperNova in forum DATA STRUCTURES, C, C++, VC ++
    Replies: 1
    Last Post: 13-08-06, 02:52 PM
  3. interger to string conversion
    By simmy_kutty83 in forum JAVA Technologies
    Replies: 0
    Last Post: 29-04-06, 09:52 PM
  4. Hello friends, i need help..
    By minamoda in forum JAVA Technologies
    Replies: 4
    Last Post: 28-03-06, 04:54 AM
  5. Passs string to a Form
    By lucky_kk20 in forum VB / ASP.NET Technologies
    Replies: 3
    Last Post: 22-02-06, 08:44 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Content Relevant URLs by vBSEO 3.5.1 PL1