Skip to content

Instantly share code, notes, and snippets.

@pete911
Created February 9, 2012 11:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pete911/1779354 to your computer and use it in GitHub Desktop.
Save pete911/1779354 to your computer and use it in GitHub Desktop.
java - string padding with characters - one liner
String.format("%10s", "foo").replace(' ', '*');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment