[Swift-user] Mapper padding

David Kelly davidk at ci.uchicago.edu
Fri Jun 28 13:55:53 CDT 2013


Hello, 


I'm writing a swift script where I'm trying to use the value of an integer to find and map a file. The filename I'm trying to map has the number in it, but is always padded with 0s to make it exactly 9 numbers long. The filename for 64 would be 000000064.csv, for example. My number can be any value from 0 to 999999999. 


Is there a way to easily build the filename string using any of the existing string libraries? As far as I know we don't have a printf-like way to format this at the moment. 


Is there a way to do this with mapper padding? 


I can do it with an ext mapper, just wondering if there's a better way. 


Thanks, 
David 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-user/attachments/20130628/342f8737/attachment.html>


More information about the Swift-user mailing list