(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.48 and 1.49

version 1.48, 2002/08/17 00:59:36 version 1.49, 2002/08/20 17:39:37
Line 235 
Line 235 
     return _rep->c16a.getData();     return _rep->c16a.getData();
 } }
  
 char* String::allocateCString(Uint32 extraBytes, Boolean noThrow) const  char* String::allocateCString(Uint32 extraBytes, Boolean& truncatedCharacters) const
 { {
       truncatedCharacters = false;
     Uint32 n = size() + 1;     Uint32 n = size() + 1;
     char* str = new char[n + extraBytes];     char* str = new char[n + extraBytes];
     char* p = str;     char* p = str;
Line 247 
Line 248 
         Uint16 c = *q++;         Uint16 c = *q++;
         *p++ = char(c);         *p++ = char(c);
  
         if ((c & 0xff00) && !noThrow)          if (c & 0xff00)
             throw TruncatedCharacter();              truncatedCharacters = true;
     }     }
  
     return str;     return str;
 } }
  
   char* String::allocateCString(Uint32 extraBytes) const
   {
       Boolean truncatedCharacters = false;
       return allocateCString(extraBytes, truncatedCharacters);
   }
   
 Char16& String::operator[](Uint32 i) Char16& String::operator[](Uint32 i)
 { {
     if (i > size())     if (i > size())
         throw OutOfBounds();          throw IndexOutOfBoundsException();
  
     return _rep->c16a[i];     return _rep->c16a[i];
 } }
Line 265 
Line 272 
 const Char16 String::operator[](Uint32 i) const const Char16 String::operator[](Uint32 i) const
 { {
     if (i > size())     if (i > size())
         throw OutOfBounds();          throw IndexOutOfBoundsException();
  
     return _rep->c16a[i];     return _rep->c16a[i];
 } }
Line 312 
Line 319 
         size = this->size() - pos;         size = this->size() - pos;
  
     if (pos + size > this->size())     if (pos + size > this->size())
         throw OutOfBounds();          throw IndexOutOfBoundsException();
  
     if (size)     if (size)
         _rep->c16a.remove(pos, size);         _rep->c16a.remove(pos, size);


Legend:
Removed from v.1.48  
changed lines
  Added in v.1.49

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2