diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-17 23:37:31 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-17 23:37:31 -0400 |
| commit | 451634ae23418b65945a9d9a3b1d895023940c18 (patch) | |
| tree | 7d0c2dc1aec246e671c20c85844ce1e78d6c5d89 /stdlib/text.h | |
| parent | f6eda4cf855fdf613cbcde0b073adfde43b354e7 (diff) | |
Add text width support and have that work for padding
Diffstat (limited to 'stdlib/text.h')
| -rw-r--r-- | stdlib/text.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/stdlib/text.h b/stdlib/text.h index 9923403c..e2b0984b 100644 --- a/stdlib/text.h +++ b/stdlib/text.h @@ -68,9 +68,10 @@ Array_t Text$lines(Text_t text); Closure_t Text$by_line(Text_t text); Text_t Text$join(Text_t glue, Array_t pieces); Text_t Text$repeat(Text_t text, Int_t count); -Text_t Text$left_pad(Text_t text, Int_t count, Text_t padding); -Text_t Text$right_pad(Text_t text, Int_t count, Text_t padding); -Text_t Text$middle_pad(Text_t text, Int_t count, Text_t padding); +Int_t Text$width(Text_t text, Text_t language); +Text_t Text$left_pad(Text_t text, Int_t width, Text_t padding, Text_t language); +Text_t Text$right_pad(Text_t text, Int_t width, Text_t padding, Text_t language); +Text_t Text$middle_pad(Text_t text, Int_t width, Text_t padding, Text_t language); int32_t Text$get_grapheme_fast(TextIter_t *state, int64_t index); uint32_t Text$get_main_grapheme_fast(TextIter_t *state, int64_t index); void Text$serialize(const void *obj, FILE *out, Table_t *, const TypeInfo_t *); |
