Brace expansion using ranges: Difference between revisions
m
→{{header|Julia}}
Line 870:
=={{header|Julia}}==
Julia currently does not handle certain trigraphs in strings correctly, such as 🌶, so that test is omitted.
<lang julia>
function ranged(str)
Line 880:
if '0' <= rang[1][1] <= '9' || rang[1][1] == '-'
x, y = parse(Int, rang[1]), parse(Int, rang[2])
pad = max(
return [string(x, pad=pad) for x in range(x, step=(x < y) ? delta : -delta, stop=y)]
else
|