Four is magic: Difference between revisions

m
Line 2,194:
 
# check for easy case first - exclude exact powers of 10
# above 10 as we'll need to stick a "one" in front of those.
if [[ $n != *00 && -n ${names[$n]} ]]; then
printf '%s%s\n' "${names[$n]}" ${suffix:+" $suffix"}
Line 2,200:
fi
 
# find the largest power of 10 that n is smaller than n
local -i i=0
local -i p=${powers_of_10[i]}
1,479

edits