Junio C Hamano writes:
> Johannes Schindelin writes:
>
>> +void argv_array_split(struct argv_array *array, const char *to_split)
>> +{
>> +while (isspace(*to_split))
>> +to_split++;
>> +for (;;) {
>> +const char *p = to_split;
>> +
>> +if (!*p)
>> +
Johannes Schindelin writes:
> +void argv_array_split(struct argv_array *array, const char *to_split)
> +{
> + while (isspace(*to_split))
> + to_split++;
> + for (;;) {
> + const char *p = to_split;
> +
> + if (!*p)
> + break;
> +
> +
This is a simple function that will interpret a string as a whitespace
delimited list of values, and add those values into the array.
Note: this function does not (yet) offer to split by arbitrary delimiters,
or keep empty values in case of runs of whitespace, or de-quote Unix shell
style. All fo
3 matches
Mail list logo