>> Running your example project in Windows I get exactly what I would  
>> expect.
>>
>>
>>   found = arr.IndexOf("within")
>> returns -1
>>
>>   found = arr.IndexOf("embedded" + EndOfLine.macintosh _
>>   + EndOfLine.macintosh + "within")
>> returns 7
>>
>> I would not expect to find "within" as a separate element.
>
> When I inspect the array elements on my Mac, "within" does not show  
> up anywhere.
>
> My guess is that the text I entered in the EditField on my Mac has
> Macintosh EndOfLines embedded in it. Try retyping the text, or some
> other text with embedded EndOfLines on your Windows machine and see
> what happens. Who knows, maybe this is a Mac-only problem.

ElfDataFields solves this problem, btw. This is because ElfDataFields  
has a special "separator" which is actually ANY line sperator. To  
activate this special seperator, just don't pass a seperator to  
ElfDataFields.

Also, ElfDataFields, if used properly, can run 3-5x faster than RB's  
split :)

You'd do it like this:

dim fi as new ElfDataFields( data )
dim s as string

while fi.MoveNext
s = fi // away you go.
wend

Although this isn't the fastest way to use ElfDataFields, it will  
solve your lines problem, by splitting CR, LF, or CRLF, even if the  
lines are mixed in the same data!

--
http://elfdata.com/plugin/
"String processing, done right"


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to