String Padding 

Given a string append char padding to the given string.

Solution:

We can easily append char by using String.PadLeft Method which return a new string instance by padding them on the left with a specified Unicode character, for a specified total length.

Similarly fashion String.PadRight to append padding at right.

Leave a Reply

Your email address will not be published. Required fields are marked *