Showing the changes to misc/codepoint_width.h (1 of 9 files). Show all
Unified · Split
| @@ -6,6 +6,9 @@ · 5 unmodified lines | |||
| 6 | * @brief Determines the number of columns required to display a given string. | 6 | * @brief Determines the number of columns required to display a given string. |
| 7 | * | 7 | * |
| 8 | * @param str Sequence of UTF-8 chars | 8 | * @param str Sequence of UTF-8 chars |
| 9 | * @param max_width Maximum allowed width of string | ||
| 10 | * @param cut_pos If max_width is exceeded, this will be initialized to last | ||
| 11 | * full printable character before width limit. | ||
| 9 | * @return int width of the string | 12 | * @return int width of the string |
| 10 | */ | 13 | */ |
| 11 | int term_disp_width(bstr str); | 14 | int term_disp_width(bstr str, int max_width, const unsigned char **cut_pos); |