Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

how to count characters in a string and if there are missing characters add them in with space.

Avatar of cmdolcet
cmdolcetFlag for United States of America asked on
Visual Basic.NET
5 Comments1 Solution248 ViewsLast Modified:


GC030L021 X 9999999.9999999999.999 999999.9999 999999.9999
                    Y 9999999.9999999999.999 999999.9999 999999.9999
                    Z 9999999.9999999999.999 999999.9999 999999.9999
                    D 9999999.9999999999.999 999999.9999 999999.9999


 How can I control the following width of a value and if that width does not meet the requirements then I use a "space" character to space it out.


MMMMMMM.mmm - Measured data results (width of 11 with 3 decimals)
NNNNNNN.nnn - Nominal data results (width of 11 with 3 decimals)
UUUUUU.uuu - Upper Tolerance Limit (width of 10 with 3 decimals)
LLLLLL.lll - Lower Tolerance Limit (width of 10 with 3 decimals)
IN.inin - Vector Cosine in X direction (I) nominal (width of 7 with 4 decimals)
JN.jnjn - Vector Cosine in Y direction (J) nominal (width of 7 with 4 decimals)
KN.knkn - Vector Cosine in Z direction (K) nominal (width of 7 with 4 decimals)

FileName1.txt