Searched defs:new_length (Results 1 - 1 of 1) sorted by relevance

/systemd/src/basic/
H A Dstring-util.c415 static char *ascii_ellipsize_mem(const char *s, size_t old_length, size_t new_length, unsigned percent) { argument
421 assert(new_length >= 3);
423 if (old_length <= 3 || old_length <= new_length)
426 r = new0(char, new_length+1);
430 x = (new_length * percent) / 100;
432 if (x > new_length - 3)
433 x = new_length - 3;
440 s + old_length - (new_length - x - 3),
441 new_length - x - 3);
446 char *ellipsize_mem(const char *s, size_t old_length, size_t new_length, unsigne argument
[all...]

Completed in 11 milliseconds