[WIP] add extra string handling functions

This is WIP, I'm just putting this in a PR so other people can look and give suggestions.

ref: #859
On 19.06.2014 21:37, Nicolas Hillegeer wrote:
>> +///     // truncation happened, deal with it
>> +///   }
>> +/// @endcode
>> +///
>> +/// @return the number of bytes copied (without the NUL terminator)
>> +///
>> +/// @see xstrlcpy
>> +static inline size_t xstrucpy(char *restrict dst,
>> +                              const char *restrict src,
>> +                              size_t bufsize,
>> +                              size_t strsize)
>> +    FUNC_ATTR_NONNULL_ALL
>> +{
>> +  size_t cpy = (strsize < bufsize) ? strsize : bufsize - 1;
>> +
>> +  if (cpy) {
> 
> I don't see this appearing on the web interface so I'll respond via mail:
> 
> Yep, right again. How do you feel about an assert? Passing a 0-sized buffer
> is probably a programming error. It will be disabled for release builds
> then.
> 

If the behaviour for such corner cases or the requirements are in the
function description, I am happy.