Michael Haggerty writes:
> On 09/11/2012 12:33 AM, Junio C Hamano wrote:
>> Michael Haggerty writes:
>>
>>> +`string_list_split`, `string_list_split_in_place`::
>>> +
>>> + Split a string into substrings on a delimiter character and
>>> + append the substrings to a `string_list`. If `maxsp
On 09/11/2012 12:33 AM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>> +`string_list_split`, `string_list_split_in_place`::
>> +
>> +Split a string into substrings on a delimiter character and
>> +append the substrings to a `string_list`. If `maxsplit` is
>> +non-negative, the
Michael Haggerty writes:
> +`string_list_split`, `string_list_split_in_place`::
> +
> + Split a string into substrings on a delimiter character and
> + append the substrings to a `string_list`. If `maxsplit` is
> + non-negative, then split at most `maxsplit` times. Return the
> +
Michael Haggerty writes:
> diff --git a/string-list.c b/string-list.c
> index 5594b7d..f9051ec 100644
> --- a/string-list.c
> +++ b/string-list.c
> @@ -204,3 +204,52 @@ void unsorted_string_list_delete_item(struct string_list
> *list, int i, int free_
> list->items[i] = list->items[list->n
Add two new functions, string_list_split() and
string_list_split_in_place(). These split a string into a string_list
on a separator character. The first makes copies of the substrings
(leaving the input string untouched) and the second splits the
original string in place, overwriting the separato
5 matches
Mail list logo