Function to output formatted columns for fixed-width fonts
$30-35 USD
Ditutup
Disiarkan lebih dari 21 tahun yang lalu
$30-35 USD
Dibayar semasa penghantaran
I need a VERY efficient VB 6.0 function that takes an array or comma-delimited text, adds spaces to each column so the columns line up with fixed width font and outputs it as a string with VBCrLf at the end of each line. I also would like to optionally give the function a "screen width" limit so that it will truncate if it goes over, and only the column I specify. I would like to specify a header "underline" character and how many spaces should be between each column. Everything can be left justified. The first line would contain the headers. See below. Function input would be something like: InputString = "Person's Name,Age,Street Address,Wages" & VBCrLf & _ "George Miller,26,100 E. 1st St., Apt. 5,$24/hour" & VBCrLf & _ "John Smith,51,523 S. Wayne Ave.,$35/hour" & VBCrLf & _ "Jackie Chan,32,2223 Wilmington Street,$21/hour" & VBCrLf & _ "Elizabeth Humperdink,32,15541 West Alameda Avenue,$21/hour" & VBCrLf OutputString = FormatColumns(InputString, "-", 2, 60, 1, True) 2 is the number of spaces between each column 60 would be the limit of the screen char. width 1 being the column I want it to truncate if the rows would go over 60. True specifies if I want the truncated column to add "..." to show there was something after it that was truncated. The following would be 62 char. wide if I didn't put in the 60 char. option to truncate it. I don't want something like the Age column truncated because it's below 20 char. as specified in the function call. OutputString would be: Person's Name Age Street Address Wages ------------------ --- ------------------------- -------- George Miller 26 100 E. 1st St., Apt. 5 $24/hour John Smith 51 523 S. Wayne Ave. $35/hour Jackie Chan 32 2223 Wilmington Street $21/hour Elizabeth Humpe... 32 15541 West Alameda Avenue $21/hour That may not come out right on the web, but if you download my attached file into Notepad with a fixed width font like Lucida Console, you'll see what I mean.
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) Complete ownership and distribution copyrights to all work purchased.
## Platform
Not platform specific
## Deadline information
Please complete within a couple days after acceptance.