| 99 | } |
| 100 | |
| 101 | size_t strlcat(char* dst, size_t dstSize, const char* src) |
| 102 | { |
| 103 | size_t i = 0, s = 0; |
| 104 | if(dst && dstSize) |
| 105 | { |
| 106 | s = strlen(dst); |
| 107 | for(; i + s + 1 < dstSize && src[i]; i++) // copy until total is at most dstSize-1 |
| 108 | dst[i + s] = src[i]; |
| 109 | dst[i + s] = 0; // always null-terminate |
| 110 | } |
| 111 | |
| 112 | while(src[i]) // read any remaining characters in the src string to get the length |
| 113 | i++; |
| 114 | |
| 115 | return i + s; |
| 116 | } |
| 117 | |
| 118 | void strlwr(char* str) |
| 119 | { |
no outgoing calls
no test coverage detected