Next: wcscasecmp, Previous: strxfrm, Up: Strings [Contents][Index]

### 5.46 `swab`—swap adjacent bytes

Synopsis

    #include <unistd.h>
    void swab(const void *in, void *out, ssize_t n);

Description
This function copies n bytes from the memory region pointed to by in to the memory region pointed to by out, exchanging adjacent even and odd bytes.

Portability
`swab` requires no supporting OS subroutines.