new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / headers / string_op.h
1 /* Copyright (C) 2009 Trend Micro Inc.
2  * All rights reserved.
3  *
4  * This program is a free software; you can redistribute it
5  * and/or modify it under the terms of the GNU General Public
6  * License (version 2) as published by the FSF - Free Software
7  * Foundation
8  */
9
10 #ifndef H_STRINGOP_OS
11 #define H_STRINGOP_OS
12
13 /* Trim the CR and/or LF from the last positions of a string */
14 void os_trimcrlf(char *str) __attribute__((nonnull));
15
16 /* Similiar to Perl's substr() function */
17 int os_substr(char *dest, const char *src, size_t position, ssize_t length) __attribute__((nonnull(1)));
18
19 /* Remove a character from a string */
20 char *os_strip_char(const char *source, char remove) __attribute__((nonnull));
21
22 /* Escape a list of characters with a backslash */
23 char *os_shell_escape(const char *src);
24
25 #endif
26