[Gambas-user] convert string to collection
Bruce Steers
bsteers4 at gmail.com
Thu May 4 11:42:33 CEST 2023
On Thu, 4 May 2023 at 10:38, Bruce Steers <bsteers4 at gmail.com> wrote:
>
>
> On Thu, 4 May 2023 at 06:07, Mayost Sharon <sharon at 455.co.il> wrote:
>
>> ---------- Original Message -----------
>> From: Jussi Lahtinen <jussi.lahtinen at gmail.com>
>> To: Gambas Mailing List <user at lists.gambas-basic.org>
>> Sent: Thu, 4 May 2023 01:29:36 +0300
>> Subject: Re: [Gambas-user] convert string to collection
>>
>> -- snip --
>>
>
> Or maybe it is faster using Mid...
>
> Dim iPos As Integer
> For Each s_02 In Split(s_01, Chr(10))
> iPos = InStr(s_02, ": ")
> col_01.Add(Mid(s_02, iPos + 2)), Mid(s_02, 1, iPos - 1))
> Next
>
oops got an extra ) char there..
should be
col_01.Add(Mid(s_02, iPos + 2), Mid(s_02, 1, iPos - 1))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230504/5e404a65/attachment.htm>
More information about the User
mailing list