q/lib/net/htons.q
2025-02-17 17:49:42 +01:00

3 lines
No EOL
72 B
Text

htons(num uint16) -> uint16 {
return ((num & 0xFF) << 8) | (num >> 8)
}