memcspn.c File Reference


Detailed Description

The memcspn() replacement function.

Author:
Pekka Pessi <Pekka.Pessi@nokia-email.address.hidden>
Date:
Created: Thu Nov 17 17:45:51 EET 2005 ppessi

#include "config.h"
#include <string.h>
#include <limits.h>

Include dependency graph for memcspn.c:


Functions

size_t memcspn (const void *mem, size_t memlen, const void *reject, size_t rejectlen)
 Search memory for bytes not in a given set.

Function Documentation

size_t memcspn ( const void *  mem,
size_t  memlen,
const void *  reject,
size_t  rejectlen 
)

Search memory for bytes not in a given set.

The memcspn() function calculates the length of the memory area mem which consists entirely of bytes not in reject.

Parameters:
mem pointer to memory area  
memlen size of mem in bytes
reject pointer to table containing bytes to reject
rejectlen size of reject table
Returns:
The memspn() function returns the number of bytes in the memory area which consists entirely of bytes not in reject.
If rejectlen is 0, or reject is NULL, it returns memlen, size of the memory area.


Sofia-SIP 1.12.4 - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.