by Karthikeyan (187 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Wed 17th January 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Get the length of a string using
' Display the length of the string "Mission Impossible"
Dim slength As Long ' receives the length of the string
slength = lstrlen("Mission Impossible") ' find the length of the string
MsgBox "The string 'Mission Impossible' contains " & slength & " characters."
End
End Sub