Author | Message | Time |
---|---|---|
Fr0z3N | What is your 'GetSTRING' function? | January 1, 2006, 9:22 AM |
JoeTheOdd | Wild stab in the dark: [pre] Public Function removeSTRING() As String Dim iPosition As Integer If Not InStr(1, m_sBuffer, vbNullChar) > 1 Then Exit Function Else iPosition = InStr(1, m_sBuffer, vbNullChar) removeSTRING = Mid(m_sBuffer, 1, iPosition - 1) m_sBuffer = Mid(m_sBuffer, iPosition + 1) End If End Function[/pre] This isn't really finished being discussed, I don't see how it can be used as a reference. | January 1, 2006, 9:54 AM |
Ringo | [quote author=Fr0z3N link=topic=13713.msg139993#msg139993 date=1136107336] What is your 'GetSTRING' function? [/quote] Joe was close :P [code] Public Function GetSTRING$(ByVal Data$, Optional ByVal AsciiTerminator As Byte = &H0) On Error Resume Next Dim tmpInt% tmpInt = InStr(1, Data, Chr(AsciiTerminator)) If tmpInt = 0 Then GetSTRING = Data Else GetSTRING = Mid(Data, 1, tmpInt - 1) End If End Function [/code] Hope this helps! | January 1, 2006, 1:41 PM |