29 lines
2.9 KiB
Plaintext
29 lines
2.9 KiB
Plaintext
> printf( "%s\n", AlignColumns( txt ) ):
|
|
Given a text file of many lines, where fields within a line
|
|
are delineated by a single 'dollar' character, write a program
|
|
that aligns each column of fields by ensuring that words in each
|
|
column are separated by at least one space.
|
|
Further, allow for each word in a column to be either left
|
|
justified, right justified, or center justified within its column.
|
|
> printf( "%s\n", AlignColumns( txt, "center" ) ): # same as above
|
|
Given a text file of many lines, where fields within a line
|
|
are delineated by a single 'dollar' character, write a program
|
|
that aligns each column of fields by ensuring that words in each
|
|
column are separated by at least one space.
|
|
Further, allow for each word in a column to be either left
|
|
justified, right justified, or center justified within its column.
|
|
> printf( "%s\n", AlignColumns( txt, "left" ) ):
|
|
Given a text file of many lines, where fields within a line
|
|
are delineated by a single 'dollar' character, write a program
|
|
that aligns each column of fields by ensuring that words in each
|
|
column are separated by at least one space.
|
|
Further, allow for each word in a column to be either left
|
|
justified, right justified, or center justified within its column.
|
|
> printf( "%s\n", AlignColumns( txt, "right" ) ):
|
|
Given a text file of many lines, where fields within a line
|
|
are delineated by a single 'dollar' character, write a program
|
|
that aligns each column of fields by ensuring that words in each
|
|
column are separated by at least one space.
|
|
Further, allow for each word in a column to be either left
|
|
justified, right justified, or center justified within its column.
|