19 #include <winpr/config.h>
25 #include <winpr/strlst.h>
26 #include <winpr/string.h>
28 void string_list_free(
char** string_list)
30 for (
size_t i = 0; string_list[i]; i++)
38 int string_list_length(
const char** string_list)
41 for (; string_list[i]; i++)
47 char** string_list_copy(
const char** string_list)
49 int length = string_list_length(string_list);
50 char** copy = calloc(length + 1,
sizeof(
char*));
57 for (
int i = 0; i < length; i++)
59 copy[i] = _strdup(string_list[i]);
66 void string_list_print(FILE* out,
const char** string_list)
68 for (
int j = 0; string_list[j]; j++)
70 (void)fprintf(out,
"[%2d]: %s\n", j, string_list[j]);