Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Tcl add a symbol N time at the end of the string
- % format "|%-25s|" hello
- |hello |
- % set width 25
- 25
- % format "|%-*s|" $width hello
- |hello |
- set padded [format "%-25s" $str]
- set padded $str[string repeat " " [expr {25 - [string length $str]}]]
- for {set padded $str} {[string length $padded] < 25} {} {
- append padded " "
- }
- set padded [binary format "A25" $str]
- % string repeat : 25
- :::::::::::::::::::::::::
Advertisement
Add Comment
Please, Sign In to add comment