| 303 | } |
| 304 | |
| 305 | inline int32_t strCopy(char* _dst, int32_t _dstSize, const char* _src, int32_t _num) |
| 306 | { |
| 307 | BX_ASSERT(NULL != _dst, "_dst can't be NULL!"); |
| 308 | BX_ASSERT(NULL != _src, "_src can't be NULL!"); |
| 309 | BX_ASSERT(0 < _dstSize, "_dstSize can't be 0!"); |
| 310 | |
| 311 | const int32_t len = strLen(_src, _num); |
| 312 | const int32_t max = _dstSize-1; |
| 313 | const int32_t num = (len < max ? len : max); |
| 314 | memCopy(_dst, _src, num); |
| 315 | _dst[num] = '\0'; |
| 316 | |
| 317 | return num; |
| 318 | } |
| 319 | |
| 320 | int32_t strCopy(char* _dst, int32_t _dstSize, const StringView& _str, int32_t _num) |
| 321 | { |
no test coverage detected