Re: [PATCH v2 1/7] lib: string: add functions to case-convert strings

2016-07-08 Thread Markus Mayer
On 7 July 2016 at 17:19, Rasmus Villemoes wrote: > On Tue, Jul 05 2016, Markus Mayer wrote: > >> +/** >> + * strncpytoupper - Copy a length-limited string and convert to uppercase. >> + * @dst: The buffer to store the result. >> + * @src: The string

Re: [PATCH v2 1/7] lib: string: add functions to case-convert strings

2016-07-07 Thread Rasmus Villemoes
On Tue, Jul 05 2016, Markus Mayer wrote: > Add a collection of generic functions to convert strings to lowercase > or uppercase. > > Changing the case of a string (with or without copying it first) seems > to be a recurring requirement in the kernel that is currently being >

Re: [PATCH v2 1/7] lib: string: add functions to case-convert strings

2016-07-07 Thread Eric Engestrom
On Tue, Jul 05, 2016 at 01:47:05PM -0700, Markus Mayer wrote: > All functions return a pointer to the terminating '\0' character in the > modified string ("dst" or "s", respectively). I think this is going to be confusing. From the man: The strcpy() and strncpy() functions return a

[PATCH v2 1/7] lib: string: add functions to case-convert strings

2016-07-05 Thread Markus Mayer
Add a collection of generic functions to convert strings to lowercase or uppercase. Changing the case of a string (with or without copying it first) seems to be a recurring requirement in the kernel that is currently being solved by several duplicated implementations doing the same thing. This