CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2000
    Location
    Tel Aviv , Israel
    Posts
    190

    help with some functions.

    i need to know some functions in VB.
    function that returns char from a string. ( like GetAt(index) in MFC.
    function find(char) that returns the index of char in the string.
    thanks



  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: help with some functions.


    ' function that return a char from a string:
    ' return MyLength chars from a string, starting at position MyPos, set MyLength to 1 for a single char
    myChar = mid(myString,MyPos,Mylength)

    'function that return the position of a char in a string

    ' mystring1 is the string being searched
    ' mystring2 is the string(char) to locate
    ' if mystring2 longer than 1, the position of the first char is returned
    MyPos = InStr(myString1,myString2)




    Tom Cannaerts
    [email protected]

    The best way to escape a problem, is to solve it.
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  3. #3
    Join Date
    Dec 1999
    Location
    CA and UT
    Posts
    5

    Re: help with some functions.

    Use the Mid() function to return characters at a certain location in a string and use InStr() to find a character in a string. The help documentation will tell you how to use these functions. (c:


    Sincerely,
    - David Hoyt -
    We're currently looking for any programmer who wants to join our programming team. Please check out the website for more information. Feel free to e-mail me at [email protected] to apply. We're working on an HTML Editor, Visual HTML. Thanks for your interest! (c:

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