mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-29 14:27:50 +00:00
Implement STRRPL
Fixes #660 STRRPL(str, "", new) does nothing (warn about it with -Wempty-strrpl)
This commit is contained in:
6
test/asm/strrpl.asm
Normal file
6
test/asm/strrpl.asm
Normal file
@@ -0,0 +1,6 @@
|
||||
println strrpl("\tld [hli], a", "[hli]", "[hl+]")
|
||||
println strrpl("lolololol", "lol", "hah")
|
||||
println strrpl("h e ll o", " ", "")
|
||||
println strrpl("world", "", "x")
|
||||
println strrpl("", "a", "b")
|
||||
println strrpl("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "a", "[bbbbbbbb]")
|
||||
4
test/asm/strrpl.err
Normal file
4
test/asm/strrpl.err
Normal file
@@ -0,0 +1,4 @@
|
||||
warning: strrpl.asm(4): [-Wempty-strrpl]
|
||||
STRRPL: Cannot replace an empty string
|
||||
warning: strrpl.asm(6): [-Wlong-string]
|
||||
STRRPL: String too long, got truncated
|
||||
6
test/asm/strrpl.out
Normal file
6
test/asm/strrpl.out
Normal file
@@ -0,0 +1,6 @@
|
||||
ld [hl+], a
|
||||
hahohahol
|
||||
hello
|
||||
world
|
||||
|
||||
[bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbbbbbb][bbbb
|
||||
Reference in New Issue
Block a user