mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-27 13:32:08 +00:00
Make the len parameter optional in STRSUB(str, pos, len)
An unspecified length will continue to the end of the string.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
SECTION "sec", ROM0
|
||||
|
||||
xstrsub: MACRO
|
||||
PRINTLN STRSUB(\1, \2, \3)
|
||||
PRINTLN STRSUB(\#)
|
||||
ENDM
|
||||
|
||||
xstrsub "ABC", 1, 1
|
||||
@@ -10,12 +10,17 @@ ENDM
|
||||
xstrsub "ABC", -2, 1
|
||||
xstrsub "ABC", -1, 1
|
||||
xstrsub "ABC", 0, 1
|
||||
xstrsub "ABC", 2
|
||||
xstrsub "ABC", -1
|
||||
xstrsub "ABC", 5
|
||||
xstrsub "ABC", -5
|
||||
xstrsub "ABC", 1, 2
|
||||
xstrsub "ABC", 2, 2
|
||||
xstrsub "ABC", 2, 32
|
||||
xstrsub "ABC", 2, 300
|
||||
xstrsub "ABC", -3, 300
|
||||
xstrsub "ABC", 4, 0
|
||||
xstrsub "ABC", 5, 0
|
||||
xstrsub "ABC", 4, 1
|
||||
xstrsub "カタカナ", 1, 2
|
||||
xstrsub "カタカナ", 3, 2
|
||||
|
||||
Reference in New Issue
Block a user