/*
 * Copyright (c) 2011 QUALCOMM Incorporated.  All rights reserved.
 * The file License.txt specifies the terms for use, modification,
 * and redistribution.
 *
 * Revisions:
 *
 *     04/18/08  [rcg]
 *              - guard with # ifndef HAVE_STRLCPY
 *
 *     06/28/00  [rcg]
 *              - File added.
 *
 */
 
 
 /************************************************************
  *                string handling utilities                 *
  ************************************************************/



/*
 * strlcpy and strlcat based on interface described in the paper
 * "strlcpy and strlcat -- consistent, safe, string copy and
 * concatenation" by Todd C. Miller and Theo de Raadt, University
 * of Colorado, Boulder, and OpenBSD project, 1998.
 */

#ifndef _STRING_UTIL_H
#  define _STRING_UTIL_H


#include "config.h"

#include <sys/types.h>
#include <string.h>

#include "utils.h"


#ifndef   HAVE_STRLCPY
size_t strlcpy(char *strdest, const char *strsource, size_t bufsize);
#endif /* HAVE_STRLCPY */
#ifndef   HAVE_STRLCAT
size_t strlcat(char *strdest, const char *strsource, size_t bufsize);
#endif /* HAVE_STRLCAT */

BOOL   equal_strings(char *str1, long len1, char *str2, long len2);
char  *string_copy (const char *str, size_t len);


#endif /* STRING_UTIL_H */
