Jump to content

[SOLVED] Insert whitespaces to fullfill a count of characters


giba

Recommended Posts

Hi there, everybody.

 

I am with a situation here.

 

I must export some datas to a specific program written in Java and this program needs to import the datas counting the characters for with field, this way, I need to insert white spaces fo fullfill a count of characters.

 

See the example below for a student:

 

ID = 6 chars

NAME = 30 chars

AGE = 2 chars

FATHERNAME = 30 chars

MOTHERNAME = 30 chars

 

In this case, if I have to export JOHN WHITE, ID 123456, 10 YEARS OLD, son of GILBERT WHITE and JANET WHITE:

 

I must have:

 

6 chars            30                    2                  30                            30

______________________________________________________________________________

        |                                  |  |                                    |                                    |<-ends here 

123456JOHN WHITE                    10GILBERT WHITE                JANETE WHITE                 

     

 

Is there a function for solving this, or some logic way to get it?

Thanks in advance!

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.