Hello, have only just upgraded Autoit from 3.3.10.2 to 3.3.12.0 & now my scripts that use _StringExplode on a delimiter = @CRLF insert the delimiter as an element in the array, the script below demonstrates this.
Text file is
1,2
3,4
4,5
6,7
8,9
9,0
The _ArrayDisplay (3.3.12.0) is:
[0] 1,2
[1]
[2] 3,4
[3]
[4] 4,5
[5]
[6] 6,7
[7]
[8] 8,9
[9]
[10] 9,0
[11]
[12]
The _ArrayDisplay (3.3.10.2) is:
[0] 1,2
[1] 3,4
[2] 4,5
[3] 6,7
[4] 8,9
[5] 9,0
[6]
#Include <File.au3>
#Include <Array.au3>
#include <String.au3>
$h = FileOpen("c:\test\stringexplode.txt",$FO_READ)
;stringexplode.txt - below
#cs CRLF at end of eachline
1,2
3,4
4,5
6,7
8,9
9,0
#ce
$sTest = FileRead($h)
FileClose($h)
$aTest = _StringExplode($sTest,@CRLF)
_ArrayDisplay($aTest);The array includes the delimiter as an element, this behavior is different to autoit 3.3.10.2, what am I missing??
I did check "Array UDF - Script Breaking Changes" but didn't find a reference to this.
I have attached the original text file for convenience
Appreciate any insight, thank you
StringExplode.txt