2 |
|
// |
3 |
|
// Douglas Thrift |
4 |
|
// |
5 |
< |
// $Id: IndividualClient.cxx,v 1.3 2003/08/17 23:39:32 douglas Exp $ |
5 |
> |
// $Id: IndividualClient.cxx,v 1.4 2003/08/18 22:25:29 douglas Exp $ |
6 |
|
|
7 |
|
#include "IndividualClient.h" |
8 |
|
|
32 |
|
{ |
33 |
|
ostringstream file; |
34 |
|
|
35 |
< |
file << number << "_"; |
35 |
> |
file << number; |
36 |
|
|
37 |
< |
for (unsigned index = 0; index < name.length(); index++) |
37 |
> |
istringstream name(this->name); |
38 |
> |
|
39 |
> |
do |
40 |
|
{ |
41 |
< |
if (isspace(name[index])) |
42 |
< |
{ |
43 |
< |
file << '_'; |
44 |
< |
} |
45 |
< |
else if (name[index] != ',' && name[index] != '.') |
41 |
> |
string word; |
42 |
> |
|
43 |
> |
name >> word; |
44 |
> |
name.get(); |
45 |
> |
|
46 |
> |
unsigned punk; |
47 |
> |
|
48 |
> |
do |
49 |
|
{ |
50 |
< |
file << char(tolower(name[index])); |
50 |
> |
punk = word.find_first_of(",."); |
51 |
> |
|
52 |
> |
if (punk != string::npos) word.erase(punk, 1); |
53 |
|
} |
54 |
+ |
while (punk != string::npos); |
55 |
+ |
|
56 |
+ |
lowercase(word); |
57 |
+ |
|
58 |
+ |
file << "_" << word; |
59 |
|
} |
60 |
+ |
while (name.good()); |
61 |
|
|
62 |
|
this->file = file.str(); |
63 |
|
} |
101 |
|
file >> word; |
102 |
|
file.get(); |
103 |
|
|
104 |
< |
if (word.length() == 1 || word == "jr" || word == "sr") |
104 |
> |
if (word.length() == 1 || word == "jr" || word == "sr" || word == "dr" |
105 |
> |
|| word == "mr" || word == "ms" || word == "mrs") |
106 |
|
{ |
107 |
|
word += '.'; |
108 |
|
} |