• BazracQ5
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hi

 

I have been trying to use the following method doesnt work. Here is the code

 

	public static String padRight(String s, integer n) {
		
		return String.format('%1$-' + n + 's', s);  
}

 I am trying to pad my strings.

 

for example if i have two words from and yesterday, i want pad from so from would be fromxxxxx. i want the padding on every word in the list to make all the words in the string have the same characters, Like in this example from and yesterday would have the same number of characters

 

Thanks

Uves