Logo Search packages:      
Sourcecode: yate version File versions  Download package

String & String::operator= ( const char *  value  ) 

Assignment from char* operator.

See also:
TelEngine::strcpy

Reimplemented in TelEngine::Regexp, TelEngine::NamedString, and TelEngine::Message.

Definition at line 397 of file String.cpp.

References c_str(), changed(), and TelEngine::Debug().

{
    if (value && !*value)
      value = 0;
    if (value != c_str()) {
      char *tmp = m_string;
      m_string = value ? ::strdup(value) : 0;
      if (value && !m_string)
          Debug("String",DebugFail,"strdup() returned NULL!");
      changed();
      if (tmp)
          ::free(tmp);
    }
    return *this;
}


Generated by  Doxygen 1.6.0   Back to index