q/lib/net/htons.q
2025-02-08 23:59:19 +01:00

3 lines
No EOL
66 B
Text

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