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

net.conv: add conv.reverse_bytes_u64/u32/u16 #21917

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

kbkpbot
Copy link
Contributor

@kbkpbot kbkpbot commented Jul 23, 2024

Feature Request #21915

reverse_bytes_u64/reverse_bytes_u32/reverse_bytes_u16 reverse a u64/u32/u16's byte order

assert 0x12345678ABCDEF00 == conv.reverse_bytes_u64(0x00EFCDAB78563412)
assert 0x12345678 == conv.reverse_bytes_u32(0x78563412)
assert 0x1234 == conv.reverse_bytes_u16(0x3412)

Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

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

Excellent work.

@spytheman spytheman changed the title add vlib/net/conv reverse_bytes_u64/u32/u16 net.conv: add conv.reverse_bytes_u64/u32/u16 Jul 23, 2024
@spytheman spytheman merged commit 4c30d35 into vlang:master Jul 23, 2024
61 checks passed
@kbkpbot kbkpbot deleted the reverse_bytes branch October 3, 2024 00:04
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