Next: , Previous: strxfrm, Up: Strings


5.41 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.