Skip to content

meteoblue/fixed-width-decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fixed-width-decoder

fixed width string reading library written in Swift.

Usage for reading fixed width strings

From string

import FW

let fwString = "  1foo\n  2bar\n"
let reader = try! FWReader(string: fwString, rowWidth: 7, fieldSizes: [3, 3])
while let row = reader.next() {
    print("\(row)")
}
// => ["  1", "foo"]
// => ["  2", "bar"]