diff options
Diffstat (limited to 'src/csv.ads')
-rw-r--r-- | src/csv.ads | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/csv.ads b/src/csv.ads new file mode 100644 index 0000000..a8273f5 --- /dev/null +++ b/src/csv.ads @@ -0,0 +1,35 @@ + + +with Ada.Strings.Unbounded; +with Ada.Containers.Vectors; +use type Ada.Strings.Unbounded.Unbounded_String; + + +generic + Delimiter : in Character := ','; + Quote : in Character := '"'; + Escape : in Character := '\'; +package CSV is + + + package String_Vectors is new Ada.Containers.Vectors + (Index_Type => Natural, + Element_Type => Ada.Strings.Unbounded.Unbounded_String); + + + subtype CSV_Record is String_Vectors.Vector; + + + function Parse_Line + (Input : in String) + return CSV_Record; + + + function Unparse_Record + (Input : in CSV_Record) + return String; + + +end CSV; + + |