Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
string1$ = "apples, pears # and bananas"
|
||||
string2$ = "pears;, " + chr$(34) + "apples ; " + chr$(34) + " an;d bananas"
|
||||
commentMarker$ = "; #"
|
||||
Print parse$(string2$, commentMarker$)
|
||||
End
|
||||
|
||||
Function parse$(string$, commentMarker$)
|
||||
For i = 1 To Len(string$)
|
||||
charIn$ = Mid$(string$, i, 1)
|
||||
If charIn$ = Chr$(34) Then
|
||||
inQuotes = Not(inQuotes)
|
||||
End If
|
||||
If Instr(commentMarker$, charIn$) And (inQuotes = 0) Then Exit For
|
||||
next i
|
||||
parse$ = Left$(string$, (i - 1))
|
||||
End Function
|
||||
Loading…
Add table
Add a link
Reference in a new issue