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

Added strxfrm #160

Merged
merged 1 commit into from
May 1, 2021
Merged

Added strxfrm #160

merged 1 commit into from
May 1, 2021

Conversation

ahgamut
Copy link
Collaborator

@ahgamut ahgamut commented May 1, 2021

One of the missing functions in #141: strxfrm transforms a string src
into a string dest such that calling strcmp(dest1, dest2) is same as
calling strcoll(src1, src2). strxfrm calls strlcpy internally because
cosmopolitan libc does not support locales.

Reference: CPPReference page for strxfrm

Copy link
Owner

@jart jart left a comment

Choose a reason for hiding this comment

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

Looks good. Could you send an email assigning copyright per https://github.com/jart/cosmopolitan/blob/master/CONTRIBUTING.md ?

@ahgamut
Copy link
Collaborator Author

ahgamut commented May 1, 2021

Would it be okay if I just provided the unlicensing declaration at https://unlicense.org/ at the start of strxfrm.c?

@jart
Copy link
Owner

jart commented May 1, 2021

Sounds good.

strxfrm transforms a string src into a string dest such that calling
strcmp(dest1, dest2) is same as calling strcoll(src1, src2). strxfrm
calls strlcpy internally because cosmopolitan libc does not support
locales. Also added the unlicensing declaration at the start of the
file.
@jart
Copy link
Owner

jart commented May 1, 2021

Thanks!

@jart jart merged commit 3aa8983 into jart:master May 1, 2021
@jart
Copy link
Owner

jart commented May 1, 2021

Binaries and docs uploaded to website. https://justine.lol/cosmopolitan/documentation.html#strxfrm

@ahgamut ahgamut deleted the strxfrm-impl branch May 2, 2021 13:25
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