rem: assert(aCstrDest != 0); const char* buf = aStrSrc.data(); size_t len = aStrSrc.length(); len = DW_MIN(len, n); mem_copy(buf, len, aCstrDest); for (size_t i=len; i < n; ++i) { aCstrDest[i] = 0; }
add: aStrDest.assign(aStrSrc, 0, n);
context: void DwStrncpy(char* aCstrDest, const DwString& aStrSrc, size_t n){    assert(aCstrDest != 0);    const char* buf = aStrSrc.data();    size_t len = aStrSrc.length();    len = DW_MIN(len, n);    mem_copy(buf, len, aCstrDest);    for (size_t i=len; i < n; ++i) {        aCstrDest[i] = 0;    }}