1132451Sroberto/*
2132451Sroberto * Copyright (C) 2000, 2001  Internet Software Consortium.
3132451Sroberto *
4132451Sroberto * Permission to use, copy, modify, and distribute this software for any
5132451Sroberto * purpose with or without fee is hereby granted, provided that the above
6132451Sroberto * copyright notice and this permission notice appear in all copies.
7132451Sroberto *
8132451Sroberto * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
9132451Sroberto * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
10132451Sroberto * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
11132451Sroberto * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
12132451Sroberto * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
13132451Sroberto * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
14132451Sroberto * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
15132451Sroberto * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16132451Sroberto */
17132451Sroberto
18132451Sroberto/* $Id: string.h,v 1.9 2001/01/09 21:57:37 bwelling Exp $ */
19132451Sroberto
20132451Sroberto#ifndef ISC_STRING_H
21132451Sroberto#define ISC_STRING_H 1
22132451Sroberto
23132451Sroberto#include <string.h>
24132451Sroberto
25132451Sroberto#include <isc/int.h>
26132451Sroberto#include <isc/lang.h>
27132451Sroberto#include <isc/platform.h>
28132451Sroberto
29132451SrobertoISC_LANG_BEGINDECLS
30132451Sroberto
31132451Srobertoisc_uint64_t
32132451Srobertoisc_string_touint64(char *source, char **endp, int base);
33132451Sroberto/*
34132451Sroberto * Convert the string pointed to by 'source' to isc_uint64_t.
35132451Sroberto *
36132451Sroberto * On successful conversion 'endp' points to the first character
37132451Sroberto * after conversion is complete.
38132451Sroberto *
39132451Sroberto * 'base': 0 or 2..36
40132451Sroberto *
41132451Sroberto * If base is 0 the base is computed from the string type.
42132451Sroberto *
43132451Sroberto * On error 'endp' points to 'source'.
44132451Sroberto */
45132451Sroberto
46132451Sroberto
47132451Srobertochar *
48132451Srobertoisc_string_separate(char **stringp, const char *delim);
49132451Sroberto
50132451Sroberto#ifdef ISC_PLATFORM_NEEDSTRSEP
51132451Sroberto#define strsep isc_string_separate
52132451Sroberto#endif
53132451Sroberto
54132451SrobertoISC_LANG_ENDDECLS
55132451Sroberto
56132451Sroberto#endif /* ISC_STRING_H */
57