| 219 | } |
| 220 | |
| 221 | txString fxConcatStringC(txMachine* the, txSlot* a, txString b) |
| 222 | { |
| 223 | txSize aSize = mxStringLength(a->value.string); |
| 224 | txSize bSize = mxStringLength(b); |
| 225 | txSize resultSize = fxAddChunkSizes(the, fxAddChunkSizes(the, aSize, bSize), 1); |
| 226 | txString result = C_NULL; |
| 227 | if (a->kind == XS_STRING_KIND) |
| 228 | result = (txString)fxRenewChunk(the, a->value.string, resultSize); |
| 229 | if (!result) { |
| 230 | result = (txString)fxNewChunk(the, resultSize); |
| 231 | c_memcpy(result, a->value.string, aSize); |
| 232 | a->value.string = result; |
| 233 | a->kind = XS_STRING_KIND; |
| 234 | } |
| 235 | c_memcpy(result + aSize, b, bSize + 1); |
| 236 | return result; |
| 237 | } |
| 238 | |
| 239 | txString fxCopyString(txMachine* the, txSlot* a, txSlot* b) |
| 240 | { |
no test coverage detected