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
Printable View
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
' 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.
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: