MCPcopy Create free account
hub / github.com/Kitware/VTK / CreateCharArrayFromString

Method CreateCharArrayFromString

IO/Geometry/vtkOpenFOAMReader.cxx:12064–12073  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

12062
12063//------------------------------------------------------------------------------
12064void vtkOpenFOAMReader::CreateCharArrayFromString(
12065 vtkCharArray* array, const char* name, vtkStdString& string)
12066{
12067 array->Initialize();
12068 array->SetName(name);
12069 const size_t len = string.length();
12070 char* ptr = array->WritePointer(0, static_cast<vtkIdType>(len + 1));
12071 memcpy(ptr, string.c_str(), len);
12072 ptr[len] = '\0';
12073}
12074
12075//------------------------------------------------------------------------------
12076void vtkOpenFOAMReader::UpdateStatus()

Callers 1

MakeInformationVectorMethod · 0.95

Calls 5

InitializeMethod · 0.45
SetNameMethod · 0.45
lengthMethod · 0.45
WritePointerMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected