Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
12
Task/Align-columns/Visual-Basic/align-columns-2.vb
Normal file
12
Task/Align-columns/Visual-Basic/align-columns-2.vb
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
Sub Main() 'usage of the above
|
||||
Const Text$ = "Given$a$text$file$of$many$lines,$where$fields$within$a$line$" & vbLf & _
|
||||
"are$delineated$by$a$single$'dollar'$character,$write$a$program" & vbLf & _
|
||||
"that$aligns$each$column$of$fields$by$ensuring$that$words$in$each$" & vbLf & _
|
||||
"column$are$separated$by$at$least$one$space." & vbLf & _
|
||||
"Further,$allow$for$each$word$in$a$column$to$be$either$left$" & vbLf & _
|
||||
"justified,$right$justified,$or$center$justified$within$its$column."
|
||||
|
||||
Debug.Print vbLf; "-- Left:": AlignCols Split(Text, vbLf), vbLeftJustify
|
||||
Debug.Print vbLf; "-- Center:": AlignCols Split(Text, vbLf), vbCenter
|
||||
Debug.Print vbLf; "-- Right:": AlignCols Split(Text, vbLf), vbRightJustify
|
||||
End Sub
|
||||
Loading…
Add table
Add a link
Reference in a new issue