From 2ebe7893fe18c953967f602c73f6d3f32185eeb6 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 7 Mar 2025 16:56:23 -0500 Subject: Add text padding functions: :left_pad(), :right_pad(), :middle_pad() --- test/text.tm | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test') diff --git a/test/text.tm b/test/text.tm index a1b36d97..91edddb4 100644 --- a/test/text.tm +++ b/test/text.tm @@ -361,3 +361,16 @@ func main(): = 1 >> concat4 == final = yes + + >> "x":left_pad(5) + = " x" + >> "x":right_pad(5) + = "x " + >> "x":middle_pad(5) + = " x " + >> "1234":left_pad(8, "XYZ") + = "XYZX1234" : Text + >> "1234":right_pad(8, "XYZ") + = "1234XYZX" : Text + >> "1234":middle_pad(9, "XYZ") + = "XY1234XYZ" : Text -- cgit v1.2.3