2003-07-29 15:48:06 +00:00
|
|
|
/*
|
2005-01-15 17:36:25 +00:00
|
|
|
* Copyright (C) 2002 - 2005 Tomasz Kojm <tkojm@clamav.net>
|
2003-07-29 15:48:06 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
2007-03-31 20:31:04 +00:00
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
2003-07-29 15:48:06 +00:00
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2006-04-09 19:59:28 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
|
|
* MA 02110-1301, USA.
|
2003-07-29 15:48:06 +00:00
|
|
|
*/
|
|
|
|
|
2004-07-13 03:30:49 +00:00
|
|
|
#ifndef __STR_H
|
|
|
|
#define __STR_H
|
2003-07-29 15:48:06 +00:00
|
|
|
|
2007-03-26 12:57:02 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
|
2007-03-28 21:38:07 +00:00
|
|
|
#include "cltypes.h"
|
|
|
|
|
2003-07-29 15:48:06 +00:00
|
|
|
int cli_strbcasestr(const char *haystack, const char *needle);
|
2004-07-13 03:30:49 +00:00
|
|
|
int cli_chomp(char *string);
|
2004-03-09 22:46:28 +00:00
|
|
|
char *cli_strtok(const char *line, int field, const char *delim);
|
2007-03-28 21:38:07 +00:00
|
|
|
uint16_t *cli_hex2ui(const char *hex);
|
2004-07-13 03:30:49 +00:00
|
|
|
char *cli_hex2str(const char *hex);
|
2005-02-20 04:14:06 +00:00
|
|
|
int cli_hex2num(const char *hex);
|
2004-07-19 17:54:40 +00:00
|
|
|
char *cli_str2hex(const char *string, unsigned int len);
|
2006-10-25 15:40:47 +00:00
|
|
|
char *cli_utf16toascii(const char *str, unsigned int length);
|
2004-10-13 20:23:50 +00:00
|
|
|
char *cli_strtokbuf(const char *input, int fieldno, const char *delim, char *output);
|
2005-01-19 00:02:27 +00:00
|
|
|
const char *cli_memstr(const char *haystack, int hs, const char *needle, int ns);
|
2006-06-20 16:54:31 +00:00
|
|
|
char *cli_strrcpy(char *dest, const char *source);
|
2007-03-26 12:57:02 +00:00
|
|
|
void cli_strtokenize(char *buffer, const char delim, const size_t token_count, const char **tokens);
|
2003-07-29 15:48:06 +00:00
|
|
|
#endif
|