It's difficult/impossible to get hold of older versions of AutoHotkey v1.1 for testing purposes.
Not widely tested. Do notify of any issues.
Code: Select all
;StrSplit for AutoHotkey v1.1 (pre-v1.1.13) (minus MaxParts parameter)
StrSplitBackport(vText, vDelim:="", vOmitChars:="")
{
if IsObject(vDelim) || (StrLen(vDelim) > 1)
{
vUnused := ""
Loop 300
{
if !InStr(vText, Chr(A_Index))
{
vUnused := Chr(A_Index)
break
}
}
if (vUnused = "")
throw "no delimiter available"
if !IsObject(vDelim)
vText := StrReplace(vText, vDelim, vUnused)
else
{
for _, vDelim in oArray
vText := StrReplace(vText, vDelim, vUnused)
}
}
else
vUnused := vDelim
oArray := []
Loop Parse, vText, % vUnused
oArray[A_Index] := Trim(A_LoopField, vOmitChars)
return oArray
}
Unicode functions for AutoHotkey Basic / AutoHotkey x32 ANSI - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=32487&p=173620#p173620