mirror of
https://github.com/FourierTransformer/ftcsv.git
synced 2024-11-19 19:54:23 +00:00
code cleanup and release version
This commit is contained in:
parent
e34c08b772
commit
db9941aee8
@ -1,9 +1,9 @@
|
|||||||
package = "ftcsv"
|
package = "ftcsv"
|
||||||
version = "1.0.1-1"
|
version = "1.0.2-1"
|
||||||
|
|
||||||
source = {
|
source = {
|
||||||
url = "git://github.com/FourierTransformer/ftcsv.git",
|
url = "git://github.com/FourierTransformer/ftcsv.git",
|
||||||
tag = "1.0.1"
|
tag = "1.0.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
description = {
|
description = {
|
@ -1,5 +1,5 @@
|
|||||||
local ftcsv = {
|
local ftcsv = {
|
||||||
_VERSION = 'ftcsv 1.0.1',
|
_VERSION = 'ftcsv 1.0.2',
|
||||||
_DESCRIPTION = 'CSV library for Lua',
|
_DESCRIPTION = 'CSV library for Lua',
|
||||||
_URL = 'https://github.com/FourierTransformer/ftcsv',
|
_URL = 'https://github.com/FourierTransformer/ftcsv',
|
||||||
_LICENSE = [[
|
_LICENSE = [[
|
||||||
@ -204,14 +204,11 @@ function ftcsv.parse(inputFile, delimiter, options)
|
|||||||
local currentChar, nextChar = string.byte(inputString, i), nil
|
local currentChar, nextChar = string.byte(inputString, i), nil
|
||||||
|
|
||||||
while i <= inputLength do
|
while i <= inputLength do
|
||||||
-- go by two chars at a time!
|
-- go by two chars at a time! currentChar is set at the bottom.
|
||||||
-- currentChar = string.byte(inputString, i)
|
-- currentChar = string.byte(inputString, i)
|
||||||
nextChar = string.byte(inputString, i+1)
|
nextChar = string.byte(inputString, i+1)
|
||||||
-- print(i, string.char(currentChar), string.char(nextChar))
|
-- print(i, string.char(currentChar), string.char(nextChar))
|
||||||
|
|
||||||
-- keeps track of characters to "skip" while going through the encoding process
|
|
||||||
-- if skipChar == 0 then
|
|
||||||
|
|
||||||
-- empty string
|
-- empty string
|
||||||
if currentChar == quote and nextChar == quote then
|
if currentChar == quote and nextChar == quote then
|
||||||
-- print("EMPTY STRING")
|
-- print("EMPTY STRING")
|
||||||
@ -226,7 +223,6 @@ function ftcsv.parse(inputFile, delimiter, options)
|
|||||||
i, doubleQuoteEscape = M.findClosingQuote(i+1, inputLength, inputString, quote, doubleQuoteEscape)
|
i, doubleQuoteEscape = M.findClosingQuote(i+1, inputLength, inputString, quote, doubleQuoteEscape)
|
||||||
-- print("I VALUE", i, doubleQuoteEscape)
|
-- print("I VALUE", i, doubleQuoteEscape)
|
||||||
skipChar = 1
|
skipChar = 1
|
||||||
-- end
|
|
||||||
|
|
||||||
-- create some fields if we can!
|
-- create some fields if we can!
|
||||||
elseif currentChar == delimiterByte then
|
elseif currentChar == delimiterByte then
|
||||||
|
Loading…
Reference in New Issue
Block a user