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 267 by douglas, 2003-08-18T15:25:29-07:00 vs.
Revision 273 by douglas, 2003-08-20T23:29:24-07:00

# Line 2 | Line 2
2   //
3   // Douglas Thrift
4   //
5 < // $Id: IndividualClient.cxx,v 1.4 2003/08/18 22:25:29 douglas Exp $
5 > // $Id: IndividualClient.cxx,v 1.6 2003/08/21 06:29:24 douglas Exp $
6  
7   #include "IndividualClient.h"
8  
# Line 59 | Line 59 | string IndividualClient::getFile(void)
59                  }
60                  while (name.good());
61  
62 <                this->file = file.str();
62 >                this->file = file.str() + '.' + extension;
63          }
64  
65          return file;
# Line 84 | Line 84 | void IndividualClient::setFile(const str
84          name = "";
85   }
86  
87 + string IndividualClient::extension = "pdf";
88 +
89   void IndividualClient::demunge(void)
90   {
91          istringstream file(demunge(this->file));
# Line 101 | Line 103 | void IndividualClient::demunge(void)
103                  file >> word;
104                  file.get();
105  
106 <                if (word.length() == 1 || word == "jr" || word == "sr" || word == "dr"
107 <                        || word == "mr" || word == "ms" || word == "mrs")
106 >                if (word.length() == 1)
107 >                {
108 >                        if (isalpha(word[0])) word += '.';
109 >                }
110 >                else if (word == "jr" || word == "sr" || word == "dr" || word == "mr"
111 >                        || word == "ms" || word == "mrs")
112                  {
113                          word += '.';
114                  }
# Line 130 | Line 136 | void IndividualClient::demunge(void)
136                  {
137                          capitalize(word, 2);
138                  }
139 +                else if (word.length() > 1)
140 +                {
141 +                        if (!isalpha(word[0]))
142 +                        {
143 +                                capitalize(word, 1);
144 +                        }
145 +                }
146  
147                  capitalize(word);
148  
# Line 158 | Line 171 | string IndividualClient::demunge(const s
171   {
172          string demunged;
173  
174 <        for (unsigned index = 0; index < munged.length(); index++)
174 >        for (unsigned index = 0; index < munged.length() - extension.length() - 1;
175 >                index++)
176          {
177                  if (munged[index] == '_')
178                  {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines