in reply to Golf: Replacing part of a string with "*"
printf "%-12.12s****\n", '5424123412345678';;
Update: Hmm. Misread your code. I thought you were obscuring the last 4 digits.
This will do the first twelve for a score of ...um...either 0 or -30-somthing :)
[0] Perl> printf "************%4.4s\n", '5424123412345678';; ************5424
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Golf: Replacing part of a string with "*"
by ikegami (Patriarch) on Aug 18, 2006 at 15:44 UTC | |
by BrowserUk (Patriarch) on Aug 18, 2006 at 15:53 UTC |