Skip to content

Instantly share code, notes, and snippets.

@asynxc
Created September 28, 2016 21:03
Show Gist options
  • Save asynxc/57c734d95a8c114d6e14430b7f5ec1cc to your computer and use it in GitHub Desktop.
Save asynxc/57c734d95a8c114d6e14430b7f5ec1cc to your computer and use it in GitHub Desktop.
'Left$() Alternative Function
'MSVBVM60.rtcLeftCharBstr
Public Declare Function rtcLeftCharBstr Lib "MSVBVM60" (ByVal sStr As String, ByVal iLen As Integer) As String
Public Function Alternative_Left(ByVal sStr As String, ByVal iLen As Integer)
Alternative_Left = StrConv(rtcLeftCharBstr(StrConv(sStr, vbUnicode), iLen), vbFromUnicode)
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment