Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

swab - swap bytes

&pagelevel(4)&pagelevel

Syntax

#include <unistd.h>

void swab(const void *src, void *dest, ssize_t nbytes);

Description swab() copies nbytes bytes, which are pointed to by src, to the object pointed to by dest,

exchanging adjacent bytes. The nbytes argument should be even and not negative. If nbytes
is odd and positive, swab() copies and exchanges nbytes-1 bytes, and the disposition of the
last byte is unspecified. If nbytes is negative, swab() does nothing. If arguments overlap,
the behavior of swab is undefined.

See also

unistd.h.