Sorry for being lazy earlier and for my poor English. What I meant was this:
    
    
    import strutils
    
    var
      file = """
        Hello,World
        Key,Value
      """
    
    for line in file.split("\n"): # iterator returns string
      var data = line.split(",") # proc returns seq[string]
      # but there is no version of split you can use as "for myKey, myValue in"
      if data.len() == 2:
        echo data[0]," = ", data[1]
    
    
    
    Run

Reply via email to