gpattern.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /* GLIB - Library of useful routines for C programming
  2. * Copyright (C) 1995-1997, 1999 Peter Mattis, Red Hat, Inc.
  3. *
  4. * SPDX-License-Identifier: LGPL-2.1-or-later
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef __G_PATTERN_H__
  20. #define __G_PATTERN_H__
  21. #if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
  22. #error "Only <glib.h> can be included directly."
  23. #endif
  24. #include <glib/gtypes.h>
  25. G_BEGIN_DECLS
  26. typedef struct _GPatternSpec GPatternSpec;
  27. GLIB_AVAILABLE_IN_ALL
  28. GPatternSpec* g_pattern_spec_new (const gchar *pattern);
  29. GLIB_AVAILABLE_IN_ALL
  30. void g_pattern_spec_free (GPatternSpec *pspec);
  31. GLIB_AVAILABLE_IN_2_70
  32. GPatternSpec *g_pattern_spec_copy (GPatternSpec *pspec);
  33. GLIB_AVAILABLE_IN_ALL
  34. gboolean g_pattern_spec_equal (GPatternSpec *pspec1,
  35. GPatternSpec *pspec2);
  36. GLIB_AVAILABLE_IN_2_70
  37. gboolean g_pattern_spec_match (GPatternSpec *pspec,
  38. gsize string_length,
  39. const gchar *string,
  40. const gchar *string_reversed);
  41. GLIB_AVAILABLE_IN_2_70
  42. gboolean g_pattern_spec_match_string (GPatternSpec *pspec,
  43. const gchar *string);
  44. GLIB_DEPRECATED_IN_2_70_FOR (g_pattern_spec_match)
  45. gboolean g_pattern_match (GPatternSpec *pspec,
  46. guint string_length,
  47. const gchar *string,
  48. const gchar *string_reversed);
  49. GLIB_DEPRECATED_IN_2_70_FOR (g_pattern_spec_match_string)
  50. gboolean g_pattern_match_string (GPatternSpec *pspec,
  51. const gchar *string);
  52. GLIB_AVAILABLE_IN_ALL
  53. gboolean g_pattern_match_simple (const gchar *pattern,
  54. const gchar *string);
  55. G_END_DECLS
  56. #endif /* __G_PATTERN_H__ */