is there an @-code i can use to have some text repeated X times or maybe even to repeat to the terminal width or repeat to the terminal width minus X columns?
maybe something like @RPT#horizline-TWIDTH@ to repeat the horizontal line character to the terminal width where horizline is the actual character to be used... or @RPT#=-L40@ to repeat the '=' from the left 40 times or @RPT#=-R40@ to do the same except from the right...
i've used "#" intead of ":" for the length specifiers so we can use format modifiers...
i'm just tossing this out there because i'm trying to dress up my message headers without hard coding dividing and framing lines to a certain width and looking unfinished when used on wide terminals or wrapping on narrow terminals...
i'm just tossing this out there because i'm trying to dress up my
message headers without hard coding dividing and framing lines to a
certain width and looking unfinished when used on wide terminals or
wrapping on narrow terminals...
How about just: @fill:<char>@ which would fill the rest of the current line with the specified char?
On 2019 Aug 16 08:55:00, you wrote to me:
i'm just tossing this out there because i'm trying to dress up my
message headers without hard coding dividing and framing lines to a
certain width and looking unfinished when used on wide terminals or
wrapping on narrow terminals...
How about just: @fill:<char>@ which would fill the rest of the current line with the specified char?
that'll work for now... thanks for implementing it :)
How about just: @fill:<char>@ which would fill the rest of the current line with the specified char?
that'll work for now... thanks for implementing it :)
Sure, no problem. I didn't really see an obvious use case for those RPT examples you gave, but if/when you have one, I'll take a second look.
Re: repeat char @-code?
By: Digital Man to mark lewis on Sat Aug 17 2019 21:49:32
How about just: @fill:<char>@ which would fill the rest of the current line with the specified char?
that'll work for now... thanks for implementing it :)
Sure, no problem. I didn't really see an obvious use case for those RPT examples you gave, but if/when you have one, I'll take a second look.
well, the idea was for something codified for the different terminal widths... kinda like the current header.asc has the line going from left to right and then terminating with the dots...
the thought was for something like
@rpt#--l20@ . . . @rpt# -c20@ . . . @rpt#--r20@
which would result in 20 "-" from the left followed by the three dots followed by 20 spaces followed by three dots ending with 20 "-" on the right but with the whole thing taking the actual terminal width into account... so maybe the "20" used in this example would be 20% instead of 20 glyphs...
it was just an idea to be able to draw using the macros and taking the screen width into account without having to draw a bunch of different screens and then figure out how to use the proper one for the terminal width of the user... but i can see how this might also be a rabbit hole, too...
Sysop: | Tandy |
---|---|
Location: | New York, USA |
Users: | 15 |
Nodes: | 13 (0 / 13) |
Uptime: | 11:44:46 |
Calls: | 314 |
Messages: | 97,816 |