File: string-utils.h

package info (click to toggle)
lttng-modules 2.14.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,808 kB
  • sloc: ansic: 74,851; sh: 548; makefile: 62
file content (21 lines) | stat: -rw-r--r-- 754 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) */
#ifndef _LTTNG_STRING_UTILS_H
#define _LTTNG_STRING_UTILS_H

/*
 * Copyright (C) 2017 Philippe Proulx <pproulx@efficios.com>
 */

typedef char (*strutils_get_char_at_cb)(size_t, void *);

bool strutils_is_star_glob_pattern(const char *pattern);
bool strutils_is_star_at_the_end_only_glob_pattern(const char *pattern);
bool strutils_star_glob_match(const char *pattern, size_t pattern_len,
		const char *candidate, size_t candidate_len);
bool strutils_star_glob_match_char_cb(
		strutils_get_char_at_cb pattern_get_char_at_cb,
		void *pattern_get_char_at_cb_data,
		strutils_get_char_at_cb candidate_get_char_at_cb,
		void *candidate_get_char_at_cb_data);

#endif /* _LTTNG_STRING_UTILS_H */