Logo Search packages:      
Sourcecode: osb-jscore version File versions  Download package

KJS::UString::UString ( UChar c,
int  length,
bool  copy 

If copy is false the string data will be adopted. That means that the data will NOT be copied and the pointer will be deleted when the UString object is modified or destroyed. Behaviour defaults to a deep copy if copy is true.

Definition at line 409 of file ustring.cpp.

  if (length == 0) {
  UChar *d;
  if (copy) {
    d = static_cast<UChar *>(malloc(sizeof(UChar) * length));
    memcpy(d, c, length * sizeof(UChar));
  } else
    d = c;
  rep = Rep::create(d, length);

Generated by  Doxygen 1.6.0   Back to index