(file) Return to String.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/String.cpp between version 1.9 and 1.12

version 1.9, 2001/04/11 07:03:02 version 1.12, 2001/04/25 22:20:56
Line 1 
Line 1 
 //BEGIN_LICENSE  //%/////////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM
 // //
Line 17 
Line 17 
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE. // DEALINGS IN THE SOFTWARE.
 // //
 //END_LICENSE  //==============================================================================
 //BEGIN_HISTORY  
 // //
 // Author:  // Author: Mike Brasher (mbrasher@bmc.com)
 // //
 // $Log$  // Modified By:
 // Revision 1.9  2001/04/11 07:03:02  mike  
 // Port to Unix  
 // //
 // Revision 1.7  2001/04/10 22:42:55  karl  //%/////////////////////////////////////////////////////////////////////////////
 // Correct error in String find  
 //  
 // Revision 1.6  2001/04/09 20:18:47  karl  
 // add find substring function  
 //  
 // Revision 1.5  2001/03/09 19:49:32  karl  
 // long lines  
 //  
 // Revision 1.4  2001/02/26 04:33:28  mike  
 // Fixed many places where cim names compared with operator==(String,String).  
 // Changed all of these to use CIMName::equal()  
 //  
 // Revision 1.3  2001/02/11 17:19:30  mike  
 // added reverseFind() method  
 //  
 // Revision 1.2  2001/02/11 05:42:33  mike  
 // new  
 //  
 // Revision 1.1.1.1  2001/01/14 19:53:14  mike  
 // Pegasus import  
 //  
 //  
 //END_HISTORY  
  
  
 #include <cctype> #include <cctype>
Line 426 
Line 400 
     return tmp;     return tmp;
 } }
  
   int CompareIgnoreCase(const char* s1, const char* s2)
   {
       while (*s1 && *s2)
       {
           int r = tolower(*s1++) - tolower(*s2++);
   
           if (r)
               return r;
       }
   
       if (*s2)
           return -1;
       else if (*s1)
           return 1;
   
       return 0;
   }
   
   Boolean GetLine(istream& is, String& line)
   {
       line.clear();
   
       Boolean gotChar = false;
       char c;
   
       while (is.get(c))
       {
           gotChar = true;
   
           if (c == '\n')
               break;
   
           line.append(c);
       }
   
       return gotChar;
   }
   
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.9  
changed lines
  Added in v.1.12

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2