aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-07 16:56:23 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-03-07 16:56:23 -0500
commit2ebe7893fe18c953967f602c73f6d3f32185eeb6 (patch)
tree6f2b5b83bc038907d8c387850ee3dd979bad2e71 /test
parent9b485be020b6021f2cb86d97efb5b05166901bdf (diff)
Add text padding functions: :left_pad(), :right_pad(), :middle_pad()
Diffstat (limited to 'test')
-rw-r--r--test/text.tm13
1 files changed, 13 insertions, 0 deletions
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