Copy n-1 number of characters from source string to the target string using lstrcpyn API
Copy n-1 number of characters from source string to the target string using lstrcpyn API
Rate Copy n-1 number of characters from source string to the target string using lstrcpyn API
(1(1 Vote))
' Copy the specified n-1 number of characters from source string to the target string
Dim source As String, target As String ' the two strings
Dim retval As Long ' return value
source = "Mission Impossible" ' the source string to copy
target = Space(7)
retval = lstrcpyn(target, source, 7)
target = Left(target, Len(target) - 1) ' remove the terminating null character
MsgBox "Source string = " & source
MsgBox "Target string = " & target
End
End Sub
Copy n-1 number of characters from source string to the target string using lstrcpyn API Comments
No comments yet — be the first to post one!
Post a Comment