~sircmpwn/hare-dev

hare: strings: document non-obvious trim testcase v1 PROPOSED

Bor Grošelj Simić: 1
 strings: document non-obvious trim testcase

 1 files changed, 1 insertions(+), 1 deletions(-)
#933542 alpine.yml success
#933543 freebsd.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/hare-dev/patches/38679/mbox | git am -3
Learn more about email & git

[PATCH hare] strings: document non-obvious trim testcase Export this patch

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
---
 strings/trim.ha | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/strings/trim.ha b/strings/trim.ha
index 952ef8c9..a6652165 100644
--- a/strings/trim.ha
+++ b/strings/trim.ha
@@ -101,7 +101,7 @@ export fn trimsuffix(input: str, trim: str) str = {
	assert(ltrim("\t\r\n  hello") == "hello");
	assert(ltrim("((()(())))())", '(', ')') == "");
	assert(ltrim("abacadabra", 'a', 'b', 'c', 'd') == "ra");
	assert(ltrim("𝚊𝚋𝚊𝚌𝚊𝚍𝚊𝚋𝚛𝚊", '𝚊', '𝚋', '𝚌', '𝚍') == "𝚛𝚊");
	assert(ltrim("𝚊𝚋𝚊𝚌𝚊𝚍𝚊𝚋𝚛𝚊", '𝚊', '𝚋', '𝚌', '𝚍') == "𝚛𝚊"); // '𝚊' = U+1D68A

	assert(rtrim("") == "");
	assert(rtrim("hello   ") == "hello");
-- 
2.36.4
hare/patches: SUCCESS in 1m39s

[strings: document non-obvious trim testcase][0] from [Bor Grošelj Simić][1]

[0]: https://lists.sr.ht/~sircmpwn/hare-dev/patches/38679
[1]: mailto:bgs@turminal.net

✓ #933542 SUCCESS hare/patches/alpine.yml  https://builds.sr.ht/~sircmpwn/job/933542
✓ #933543 SUCCESS hare/patches/freebsd.yml https://builds.sr.ht/~sircmpwn/job/933543