Add the "columns(str)" variant.

This commit is contained in:
Dianne Skoll
2022-10-11 13:18:44 -04:00
parent d7975634af
commit 8ada68ce54
8 changed files with 123 additions and 6 deletions

18
examples/alignment.rem Normal file
View File

@@ -0,0 +1,18 @@
# Demo the columns() function
#
# Run as: remind -@2 alignment.rem
SET $AddBlankLines 0
BANNER %
FSET center(x) pad("", " ", (columns() - columns(x))/2) + x
FSET right(x) pad("", " ", columns() - columns(x)) + x
MSG This is left-aligned.
MSG [ansicolor(0,255,0)]This is also left-aligned.[ansicolor("")]
MSG [center("This is centered.")]
MSG [ansicolor(0,255,0) + center("🌕 🌕 🌕 🌕 This is also centered. ") + ansicolor("")]
msg [right("This is right-aligned.")]
msg [ansicolor(0,255,0) + right("This is also right-aligned. 🌕 🌕 🌕") + ansicolor("")]