| 471 | } |
| 472 | |
| 473 | HOSTDEVICE static inline void PD_PString_AppendN(PD_PString *dst, |
| 474 | const char *src, |
| 475 | size_t src_size) { |
| 476 | if (!src_size) return; |
| 477 | |
| 478 | size_t dst_size = PD_PString_GetSize(dst); |
| 479 | |
| 480 | // For append use cases, we want to ensure amortized growth. |
| 481 | PD_PString_ReserveAmortized(dst, dst_size + src_size); |
| 482 | char *dst_c = PD_PString_ResizeUninitialized(dst, dst_size + src_size); |
| 483 | |
| 484 | PD_Memcpy(dst_c + dst_size, src, src_size); |
| 485 | } |
| 486 | |
| 487 | HOSTDEVICE static inline void PD_PString_Append(PD_PString *dst, |
| 488 | const PD_PString *src) { |
no test coverage detected