MCPcopy Create free account
hub / github.com/Cantera/cantera / copyString

Function copyString

src/base/stringUtils.cpp:203–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203size_t copyString(const string& source, char* dest, size_t length)
204{
205 const char* c_src = source.c_str();
206 size_t N = std::min(length, source.length()+1);
207 size_t ret = (length >= source.length() + 1) ? 0 : source.length() + 1;
208 std::copy(c_src, c_src + N, dest);
209 if (length != 0) {
210 dest[length-1] = '\0';
211 }
212 return ret;
213}
214
215string trimCopy(const string &input) {
216 return ba::trim_copy(input);

Callers 15

th_geteostype_Function · 0.85
kin_gettype_Function · 0.85
reactor_typeFunction · 0.85
reactor_nameFunction · 0.85
connector_typeFunction · 0.85
connector_nameFunction · 0.85
domain_typeFunction · 0.85
domain_componentNameFunction · 0.85
soln_nameFunction · 0.85
soln_adjacentNameFunction · 0.85
thermo_getNameFunction · 0.85
thermo_getSpeciesNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected