You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
397 B
17 lines
397 B
#include "tjcstrutils.hpp"
|
|
|
|
namespace iflytop {
|
|
const char* TJCStrUtils::cpystr(char* cpyto, const char* strbegin, int32_t maxlen) {
|
|
if (strbegin == NULL) return NULL;
|
|
if (*strbegin == 0xFF) return NULL;
|
|
|
|
int32_t i = 0;
|
|
for (i = 0; i < maxlen; i++) {
|
|
cpyto[i] = strbegin[i];
|
|
if (strbegin[i] == 0) {
|
|
return &strbegin[i + 1];
|
|
}
|
|
}
|
|
return NULL;
|
|
}
|
|
} // namespace iflytop
|