core: Add a string list membership check function

This adds a pa_str_in_list() to check for a given string in a
space-separated list of strings. For now, this is merely present to
avoid duplication of role matching code (intended roles can be a
space-separate list) across modules.
This commit is contained in:
Arun Raghavan 2011-10-27 12:49:18 +02:00
parent 667289679f
commit 06fc121eef
4 changed files with 23 additions and 40 deletions

View file

@ -204,6 +204,7 @@ void pa_unset_env_recorded(void);
pa_bool_t pa_in_system_mode(void);
#define pa_streq(a,b) (!strcmp((a),(b)))
pa_bool_t pa_str_in_list_spaces(const char *needle, const char *haystack);
char *pa_get_host_name_malloc(void);
char *pa_get_user_name_malloc(void);