Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add variants of DString.insert_at to match .append #1510

Merged
merged 2 commits into from
Oct 2, 2024

Conversation

chri-k
Copy link
Contributor

@chri-k chri-k commented Oct 1, 2024

Adds more methods to insert things in the middle of a DString:

insert_string_at(usz, DString)
insert_char_at(usz, char)
insert_char32_at(usz, Char32)
insert_utf32_at(usz, Char32[])

And to match .append, i renamed .insert_at(usz, String) to insert_chars_at, and instead made .insert_at a macro that picks a function based on type, like .append (it will pick the renamed one for String so nothing should break).

I also updated append_utf32 and append_char32 to now return the size of the utf8 they appended for convenience (and of course the insert versions do the same). That shouldn't affect anything either

@chri-k
Copy link
Contributor Author

chri-k commented Oct 1, 2024

And of course i somehow managed to include six lines of space indentation in the PR, despite already having undone the commit once to fix those exact same six lines of space indentation.

@lerno
Copy link
Collaborator

lerno commented Oct 1, 2024

Can you add something in releasenotes about this as well please?

@chri-k
Copy link
Contributor Author

chri-k commented Oct 2, 2024

My bad. Added line to release notes (and fixed the spaces this is embarrassing)

@lerno lerno merged commit 2233f24 into c3lang:master Oct 2, 2024
34 checks passed
@lerno
Copy link
Collaborator

lerno commented Oct 2, 2024

Thank you!

@chri-k chri-k deleted the dstring-insert branch October 2, 2024 08:37
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