Skip to content

[Strings] Implement stringview_wtf16.slice#6404

Merged
kripken merged 7 commits intoWebAssembly:mainfrom
kripken:string.slice
Mar 19, 2024
Merged

[Strings] Implement stringview_wtf16.slice#6404
kripken merged 7 commits intoWebAssembly:mainfrom
kripken:string.slice

Conversation

@kripken
Copy link
Member

@kripken kripken commented Mar 14, 2024

No description provided.

@kripken kripken requested a review from tlively March 14, 2024 23:34
Literals contents;
if (endVal > startVal) {
contents.reserve(endVal - startVal);
for (size_t i = startVal; i < endVal; i++) {
Copy link
Member

Choose a reason for hiding this comment

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

We need to check that the string is ascii up to endVal before we execute the slice.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, fixed.

Copy link
Member

@tlively tlively left a comment

Choose a reason for hiding this comment

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

LGTM!

@kripken kripken merged commit 70f860e into WebAssembly:main Mar 19, 2024
@kripken kripken deleted the string.slice branch March 19, 2024 19:30
@gkdn gkdn mentioned this pull request Aug 31, 2024
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.

2 participants