Skip to content

Comments

Add support for explicit length string duplication#1450

Merged
alexcrichton merged 2 commits intobytecodealliance:mainfrom
surajk-m:c/string-dup-with-len
Dec 8, 2025
Merged

Add support for explicit length string duplication#1450
alexcrichton merged 2 commits intobytecodealliance:mainfrom
surajk-m:c/string-dup-with-len

Conversation

@surajk-m
Copy link
Contributor

@surajk-m surajk-m commented Dec 6, 2025

Closes #1437

world_string_dup only works if the string ends with \0. This PR adds imports_string_dup_n which takes a len and duplicates that exact slice.

Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

@alexcrichton alexcrichton added this pull request to the merge queue Dec 8, 2025
Merged via the queue into bytecodealliance:main with commit e3725a9 Dec 8, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C: Add imports_string_dup_n function for strings with length

2 participants