aboutsummaryrefslogtreecommitdiff
path: root/challenge-002/paulo-custodio/lua/ch-1.lua
blob: 90480056afeb1fbff8dc225c473dee2819504a28 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env lua

--[[
Challenge 002

Challenge #1
Write a script or one-liner to remove leading zeros from positive numbers.
--]]

num = string.gsub(arg[1], "^0+(%d)", "%1")
io.write(num, "\n")