StringBuilder_IndexOf (XAPI2000)
Exempel (VB 6.0) Dim I As Long ' Initiera StringBuilder-funktionerna If StringBuilder_Initialize() = True Then ' Addera några strängar till den interna textbufferten StringBuilder_Append "BMW" StringBuilder_Append " " StringBuilder_Append "Fiat" StringBuilder_Append " " StringBuilder_Append "Opel" StringBuilder_Append " " StringBuilder_Append "Mercedes" StringBuilder_Append " " StringBuilder_Append "Toyota" StringBuilder_Append " " StringBuilder_Append "SAAB" StringBuilder_Append " " StringBuilder_Append "Volvo" ' Returnera index till delsträngen "SAAB" I = StringBuilder_IndexOf("SAAB") ' Skriv ut erhållen index på en label på ett formulär Label1 = CStr(I) ' Frigör minne StringBuilder_Dispose End If |