copy a list of src's into dst the list of src's MUST be terminated by a NULL parameter dStrccpyl(dst, sizeof(dst), src1, src2, NULL);
| 300 | // the list of src's MUST be terminated by a NULL parameter |
| 301 | // dStrccpyl(dst, sizeof(dst), src1, src2, NULL); |
| 302 | char* dStrcpyl(char *dst, dsize_t dstSize, ...) |
| 303 | { |
| 304 | const char* src = NULL; |
| 305 | char *p = dst; |
| 306 | |
| 307 | AssertFatal(dstSize > 0, "dStrcpyl: destination size is set zero"); |
| 308 | dstSize--; // leave room for string termination |
| 309 | |
| 310 | va_list args; |
| 311 | va_start(args, dstSize); |
| 312 | |
| 313 | // concatenate each src to end of dst |
| 314 | while ( (src = va_arg(args, const char*)) != NULL ) |
| 315 | { |
| 316 | while( dstSize && *src ) |
| 317 | { |
| 318 | *p++ = *src++; |
| 319 | dstSize--; |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | va_end(args); |
| 324 | |
| 325 | // make sure the string is terminated |
| 326 | *p = 0; |
| 327 | |
| 328 | return dst; |
| 329 | } |
| 330 | |
| 331 | |
| 332 | S32 dStrcmp(const UTF16 *str1, const UTF16 *str2) |
no outgoing calls
no test coverage detected