Searched refs:old_length (Results 1 – 3 of 3) sorted by relevance
/systemd-251/src/test/ |
D | test-ellipsize.c | 14 static void test_ellipsize_mem_one(const char *s, size_t old_length, size_t new_length) { in test_ellipsize_mem_one() argument 21 n = memdup_suffix0(s, old_length); in test_ellipsize_mem_one() 31 old_length, utf8_console_width(n), in test_ellipsize_mem_one() 38 t1 = ellipsize_mem(n, old_length, new_length, 30); in test_ellipsize_mem_one() 45 t2 = ellipsize_mem(n, old_length, new_length, 90); in test_ellipsize_mem_one() 52 t3 = ellipsize_mem(n, old_length, new_length, 100); in test_ellipsize_mem_one() 59 if (new_length >= old_length) { in test_ellipsize_mem_one()
|
/systemd-251/src/basic/ |
D | string-util.c | 291 static char *ascii_ellipsize_mem(const char *s, size_t old_length, size_t new_length, unsigned perc… in ascii_ellipsize_mem() argument 299 if (old_length <= new_length) in ascii_ellipsize_mem() 300 return strndup(s, old_length); in ascii_ellipsize_mem() 341 memcpy(t + x + 3, s + old_length - suffix_len, suffix_len); in ascii_ellipsize_mem() 347 char *ellipsize_mem(const char *s, size_t old_length, size_t new_length, unsigned percent) { in ellipsize_mem() argument 369 return strndup(s, old_length); in ellipsize_mem() 375 if (ascii_is_valid_n(s, old_length)) in ellipsize_mem() 376 return ascii_ellipsize_mem(s, old_length, new_length, percent); in ellipsize_mem() 382 for (i = s; i < s + old_length; i = utf8_next_char(i)) { in ellipsize_mem() 397 for (j = s + old_length; j > i; ) { in ellipsize_mem() [all …]
|
/systemd-251/src/shared/ |
D | format-table.c | 1888 size_t w = 0, space, lspace, old_length, clickable_length; in align_string_mem() local 1899 old_length = strlen(str); in align_string_mem() 1908 clickable_length = old_length; in align_string_mem() 1912 while (p < str + old_length) { in align_string_mem()
|