CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 1999
    Location
    US
    Posts
    34

    How to reverse a string?

    Is there a standard function to reverse a string?
    thks!


  2. #2
    Join Date
    Aug 1999
    Location
    India-Delhi
    Posts
    106

    Re: How to reverse a string?

    alexK,
    Use following code, I made a dll of such functions... I just copied it for you.

    private Function Reverse(myStr as string) as string
    Dim TempStr as string
    Dim lLen as Long
    lLen = len(myStr)
    TempStr = ""
    for i = lLen to 1 step -1
    TempStr = TempStr & mid(myStr, i, 1)
    next i
    Reverse = TempStr
    End Function




    I hope this will solve the problem.

    Santulan

  3. #3
    Join Date
    May 1999
    Posts
    3,332

    Re: How to reverse a string?

    vb6 has a strReverse function


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured