ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/utils/StringUtils.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/utils/StringUtils.cpp (file contents):
Revision 1598 by chrisfen, Tue Oct 19 18:21:25 2004 UTC vs.
Revision 1614 by gezelter, Wed Oct 20 04:55:21 2004 UTC

# Line 1 | Line 1
1   #include "utils/StringUtils.hpp"
2  
3   using namespace std;
4 using namespace oopse;
4  
5 + namespace oopse {
6   string UpperCase(const string& S) {
7    string uc = S;
8    unsigned int n = uc.size();
# Line 81 | Line 81 | int findBegin(istream &theStream, char* startText ){
81      
82      the_token = strtok( readLine, " ,;\t" );
83      if ( the_token != NULL)
84 <      if (!strcmp("begin", the_token)) {
84 >      if (!strcasecmp("begin", the_token)) {
85          the_token = strtok( NULL, " ,;\t" );
86          if ( the_token != NULL){
87 <          foundText = !strcmp( startText, the_token );
87 >          foundText = !strcasecmp( startText, the_token );
88          }
89        }
90      
# Line 130 | Line 130 | int isEndLine(char *line) {
130    
131    foo = strtok(working_line, " ,;\t");
132  
133 < if (!strcasecmp(foo, "end")) return 1;
133 >  if (foo != NULL) {
134 >
135 >    if (!strcasecmp(foo, "end")) return 1;
136 >
137 >  }
138  
139   return 0;
140   }
141 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines