i think it would be very useful for others making the v2 transition to have examples shown for how they could fix their code.
i don't know if these examples should be in the help pages for each command, or if they should be in the v2-changes doc. maybe the v2-changes doc could be organized better and have headings and examples for each of the changes, and that doc could become a more definitive transition guide from v1 to v2 (replacing the old Script Compatibility page). in that case the new v2-changes doc should prob get moved into the Docs repo
as an example, these could go in the SubStr help doc, or an expanded v2-changes doc
Code: Select all
;StringLeft, hello_world3, hello_world3, 5
MsgBox, % SubStr("hello_world3", 1, 5)
;StringRight, hello_world3, hello_world3, 6
MsgBox, % SubStr("hello_world3", -5) ;// AHK v1
MsgBox, % SubStr("hello_world3", -6) ;// AHK v2
;StringTrimLeft, hello_world3, hello_world3, 6
MsgBox, % SubStr("hello_world3", 7)
;StringTrimRight, hello_world3, hello_world3, 7
MsgBox, % SubStr("hello_world3", 1, -7)