I am using delphi 2 and want to make sure that a string entered is of a certain length and if not i want to pad it to the correct lengh:
I want to make sure that the characters within the string can be divided by 8 and if not add the correct number of spaces till it can be.
"this is a string" contains 16 characters so no padding is needed as it can be divided by 8 evenly.
"this is a string too" contains 20 characters and will need 4 spaces to pad it so that i can then divide it by 8 with an even result.
any one help me on this?