ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/trunk/VTBFileUtil2/IndividualClient.cxx
(Generate patch)

Comparing trunk/VTBFileUtil2/IndividualClient.cxx (file contents):
Revision 266 by douglas, 2003-08-17T16:39:32-07:00 vs.
Revision 267 by douglas, 2003-08-18T15:25:29-07:00

# Line 2 | Line 2
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  
# Line 32 | Line 32 | string IndividualClient::getFile(void)
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          }
# Line 88 | Line 101 | void IndividualClient::demunge(void)
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                  }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines