swab

Swaps bytes.

Format

#include  <unistd.h>

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

Arguments

src
A pointer to the location of the string to copy.
dest
A pointer to where you want the results copied.
nbytes
The number of bytes to copy. Make this argument an even value. When it is an odd value, the swab function uses nbytes -1 instead.

Description

This function copies the number of bytes specified by nbytes from the location pointed to by src to the array pointed to by dest. The function then exchanges adjacent bytes. If a copy takes place between objects that overlap, the result is undefined.


Previous Page | Next Page | Table of Contents | Index