At 11:56 AM -0700 4/8/07, Dennis Birch wrote:
>It seems to me that Split is somewhat useless if it doesn't take into
>account an EndOfLine in the middle of a chunk of text it's splitting.
>If it included an array element that had the word before the
>EndOfLilne, the EndOfLine and the word after the EndOfLine, I could
>consider that functional (although not as useful as I would hope), but
>it didn't. In the sample project I included, the words after an
>EndOfLine simply do not appear in the array. Does anybody else agree
>that this is less than ideal or even incorrect functionality?
Hi Dennis
I tested Split on Mac OSX 10.4.9 using a tweak of your example and I
think Split is working correctly.
dim s As String
dim arr() As String
dim found As Integer
arr = Split(s)
msgbox Join(arr, " ")
If you join the strings you'll see that all the words are there. As
Steve suggested, I think the problem is that the debugger is only
showing you the last line of multiline text in string array elements.
The words after EndOfLine ARE really there, you just don't see them
in the debugger.
Split is very useful the way it is, but a nice enhancement might be
the ability to specify either "white space" or multiple separate
characters as the delimiter.
Regards,
Joe Huber
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>