String.metaClass.pad = { n = 2 -> delegate.padLeft(n, '0') } def t = "1" t.pad(4)