                         
                     } else {
                         
-                        if result.count == 0 {
+                        if result.length == 0 {
                             result = "\("")"
                         } else {
                             result = "\(result)\(div)\("")"

    open func write(text: String) {
        let path = "\(directory)/\(self.csvFileName())"
        let fileManager = FileManager.default
        let updatedString = text.replacingOccurrences(of: "\n", with: "\\n").replacingOccurrences(of: "\t", with: "\\t").replacingOccurrences(of: "\r", with: "\\r")
        
        
        if !fileManager.fileExists(atPath: path) {

public func readCSVFromDefaultPath(_ fileName:String) -> NSMutableDictionary{
    return CSVExport.export.readCSVFromDefaultPath(fileName);
}


///a free function to make read the CSV file
public func readCSVObject(_ filePath:String) -> CSV {
    let fileDetails = CSVExport.export.readCSV(filePath);
    return CSVExport.export.converToObject(fileDetails)
}

///a free function to make read the CSV file
public func readCSVObjectFromDefaultPath(_ fileName:String) -> CSV {
    let fileDetails = CSVExport.export.readCSVFromDefaultPath(fileName);
    return CSVExport.export.converToObject(fileDetails)
}

