I'm converting VB to C++. I don't know how to convert InStr() to C++. I have manged Left() but InStr() is not available in C++. Can Someone please tell me how to convert InStr() to C++.
Public Function CW_Name(ByVal alIndex As Long) As String
If Not Fb_ValidIndex(alIndex) Then Exit Function
'-->DT - 08/10/11 - SIT#47953 - Truncate string on Chr(0)
Dim liMark As Integer
liMark = InStr(1, CurrentMat.Description, Chr(0))
If liMark Then
CW_Name = Left(CurrentMat.Description, liMark - 1)
Else
CW_Name = CurrentMat.Description
End If
'<--DT - 08/10/11 - SIT#47953 - Truncate string on Chr(0)
End Function
Thanks in Advance.
Aucun commentaire:
Enregistrer un commentaire