Vampsoft: Parse Text Function
Parses a Line of Text, Great for Chats... Example Layout String = "[Hello] [This] [is] [an] [Example] [Layout]"
AI
KI-Zusammenfassung: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Quellcode
Dim xText(10) As String
Dim total As Integer
Sub ParseText(Text As String)
Dim x As Integer
x = 0
For i = 1 To Len(Text) 'do Until i = the length of the string
xText(x) = "" 'Make sure there is nothing in it already
If Mid$(Text, i, 1) = "[" Then 'Check for a Start Bracket '['
i = i + 1 'Add One to I so you don't get the Bracket
Do
xText(x) = xText(x) + Mid$(Text, i, 1) 'Added the leter at i in text to xtext at x
i = i + 1 'NExt letter
Loop Until Mid$(Text, i, 1) = "]" 'loop till you find a end bracket ']'
x = x + 1 'Add 1 to x for the next element in xText
total = total + 1 'keep track of total.
End If
Next i
End Sub
Private Sub Form_Load()
total = 0
Call ParseText("[Word0] [Word1] [Word2] [Word3] [Word4] [Word5] [Word6]")
For i = 0 To total - 1
MsgBox "xText(" & i & "): " & xText(i)
Next i
Originalkommentare (3)
Wiederhergestellt von der Wayback Machine