Assign to string s the value of integer i in 3 decimal digits. Pad with zeros if i < 100. Keep all digits if i ≥ 1000.
import "fmt"
s := fmt.Sprintf("%03d", i)
string s = string.Format("{0:000}",i);
import std.format : format;
string s = format("%03d", i);
write (unit=s,fmt='(I0.3)') i
String s = String.format("%03d", i);
$s = sprintf('%03d', $i);
s := format('%.3d',[i]);
my $s = sprintf '%03d', $i;
s = format('03d', i)
s = "%03d" % i
let s = format!("{:03}", i);
No security, no password. Other people might choose the same nickname.