* @brief Create a string array from C-string array * @param strings Array of C-strings * @param count Number of strings * @return New string array, or NULL on failure */
| 973 | * @return New string array, or NULL on failure |
| 974 | */ |
| 975 | zvec_string_array_t *zvec_string_array_create_from_strings(const char **strings, |
| 976 | size_t count) { |
| 977 | if (!strings || count == 0) { |
| 978 | return nullptr; |
| 979 | } |
| 980 | zvec_string_array_t *array = zvec_string_array_create(count); |
| 981 | if (!array) return nullptr; |
| 982 | for (size_t i = 0; i < count; ++i) { |
| 983 | zvec_string_array_add(array, i, strings[i]); |
| 984 | } |
| 985 | return array; |
| 986 | } |
| 987 | |
| 988 | /** |
| 989 | * @brief Add a string to string array at specified index |
nothing calls this directly
no test coverage detected