# File format.rb, line 528 def formatString (s, unused_var_name=nil, unused_aBinding=nil) if (s.size == 1) return formatInt(s) end num = s.split('.') # should this take into account internationalization? res = num[0] res = "" if (res.nil?) ## pgr xxx spaceLeft = @fraction + @radix if (res.size > @whole) spaceLeft = @len - res.size() end if (spaceLeft > 0) res += '.' spaceLeft -= 1 end res += getFract(num, spaceLeft) if (spaceLeft > 0) max = @len if (res.size > max) res = res[0,max] end res.rjust(max) end