mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Implement STRRIN, like STRIN but searching from the right
This commit is contained in:
15
test/asm/strin-strrin.asm
Normal file
15
test/asm/strin-strrin.asm
Normal file
@@ -0,0 +1,15 @@
|
||||
SECTION "Test", ROM0
|
||||
|
||||
assert STRIN("foo bar baz", "bar") == STRRIN("foo bar baz", "bar")
|
||||
|
||||
assert STRIN("foo bar bargain", "bar") == 5
|
||||
assert STRRIN("foo bar bargain", "bar") == 9
|
||||
|
||||
assert STRIN("foo bar", "qux") == 0
|
||||
assert STRRIN("foo bar", "qux") == 0
|
||||
|
||||
assert STRIN("foo", "foobar") == 0
|
||||
assert STRRIN("foo", "foobar") == 0
|
||||
|
||||
assert STRIN("foobar", "") == 1
|
||||
assert STRRIN("foobar", "") == STRLEN("foobar") + 1
|
||||
0
test/asm/strin-strrin.err
Normal file
0
test/asm/strin-strrin.err
Normal file
0
test/asm/strin-strrin.out
Normal file
0
test/asm/strin-strrin.out
Normal file
Reference in New Issue
Block a user