[Gambas-user] Issue with split loosing embedded quotes

Brian G brian at westwoodsvcs.com
Sat Feb 27 20:19:46 CET 2021


I don't know if anyone else is having an issue, But I am unable to log into the bug tracker, and I am certain I know my password! 
I used the program from the farm to pack it hope it works. 

Split looses embedded quotes. I not sure how to attach the test project any more. 
so here is the program: 

--------------------------------------------cut here------------------------------------------------------- 
' Gambas module file 

Public Sub Main() 

Dim sIn As String = File.Load("TestQuote") 
Dim aSplit As String[] = Split(sIn, "\n", "\"\"", False, True) 
Print "Before Split :" 
Print " Please compare line 8 on after to the before split line\nthe closing quote is lost\nAt the match = \\\" < -notice missing quote" 
Print sIn 
Print 
Print "After Split missing a close quote" 
Dim i As Integer = 1 
For Each sIn In aSplit 
Print Format(i, "###0");; sIn 
Inc i 
Next 
Print 
Print "Done" 
End 
------------------cut here----------------------------------- 
Here is the file for the program to read: 
--------------------cut here--------------------------------- 
#!/usr/bin/env -S gbs3 --strict 
class myclass 

public sub _call() 
dim i as integer = 0 
dim sharedmem as new collection 
sharedmem.default = "boom" 
Print "Error String Values fail to match = \""; SharedMem["Str" & Str(i)]; "\"" 
If "a" = "b" then print "hello dolly" 
If "a" = "b" then print "hello dolly" 
If "a" = "b" then print "hello dolly" 
If "a" = "b" then print "hello dolly" 
If "a" = "b" then print "hello dolly" 
end 
End Class 

print "hello" 
---------------------------------------------cut here---------------------- 
Anyway 

"Failure is the key to success; 
each mistake teaches us something" .. Morihei Ueshiba 
Brian G 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210227/9a585801/attachment-0001.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: TestQuoteLost-0.0.1.tar.gz.gmail.txt
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210227/9a585801/attachment-0001.txt>


More information about the User mailing list