blob: 5d10ce1369be57fa72d7d49824afdf7237d74c1b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
with CSV;
package body Candidates is
function To_String
(Input_Candidate : in Candidate;
Delimiter : in Character := ',')
return String
is
package My_CSV is new CSV (Delimiter => Delimiter);
use type My_CSV.String_Vectors.Vector;
My_Record : My_CSV.CSV_Record;
begin
My_Record :=
My_CSV.String_Vectors.Empty_Vector &
Input_Candidate.Group &
Input_Candidate.Group_Rank &
Input_Candidate.First_Name &
Input_Candidate.Last_Name &
Input_Candidate.Party;
return My_CSV.Unparse_Record (My_Record);
end To_String;
end Candidates;
|