aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-17 23:37:31 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-03-17 23:37:31 -0400
commit451634ae23418b65945a9d9a3b1d895023940c18 (patch)
tree7d0c2dc1aec246e671c20c85844ce1e78d6c5d89 /test
parentf6eda4cf855fdf613cbcde0b073adfde43b354e7 (diff)
Add text width support and have that work for padding
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 4e38e346..45215251 100644
--- a/test/text.tm
+++ b/test/text.tm
@@ -374,3 +374,16 @@ func main():
= "1234XYZX" : Text
>> "1234":middle_pad(9, "XYZ")
= "XY1234XYZ" : Text
+
+ >> amelie:width()
+ = 6
+ cowboy := "🤠"
+ >> cowboy:width()
+ = 2
+ >> cowboy:left_pad(4)
+ = " 🤠"
+ >> cowboy:right_pad(4)
+ = "🤠 "
+ >> cowboy:middle_pad(4)
+ = " 🤠 "
+