1 /* ################################################################### */
2 /* Copyright 2015, Pierre Gentile (p.gen.progs@gmail.com) */
4 /* This Source Code Form is subject to the terms of the Mozilla Public */
5 /* License, v. 2.0. If a copy of the MPL was not distributed with this */
6 /* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
7 /* ################################################################### */
16 typedef struct interval_s interval_t
;
17 typedef struct range_s range_t
;
25 /* Structure used by the replace function to delimit matches */
26 /* """"""""""""""""""""""""""""""""""""""""""""""""""""""""" */
37 interval_comp(void const *a
, void const *b
);
40 interval_swap(void **a
, void **b
);
43 optimize_an_interval_list(ll_t
*list
);
46 concat(const char *str1
, ...);
49 strprefix(char *str1
, char *str2
);
52 ltrim(char *str
, const char *trim
);
55 rtrim(char *str
, const char *trim
, size_t min_len
);
58 my_strcasecmp(const char *str1
, const char *str2
);
61 my_strcpy(char *dst
, char *src
);
70 my_wcscasecmp(const wchar_t *w1s
, const wchar_t *w2s
);
73 is_integer(const char * const s
);
76 swap_string_parts(char **s
, size_t first
);
79 strrep(char *s
, const char c1
, const char c2
);
82 strprint(char const *s
);
85 hexdump(const char *buf
, FILE *fp
, const char *prefix
, size_t size
);
88 my_wcswidth(const wchar_t *s
, size_t n
);
91 get_sorted_array_target_pos(long *array
, long nb
, long value
);
94 is_in_foreground_process_group(void);
97 isempty_non_utf8(const unsigned char *s
);
100 isempty_utf8(const unsigned char *s
);