Join Strings with a Delimiter

This function joins together unicode strings into one large unicode string by using a specified unicode string as a delimiter.

Unicode code strings occupy 16 bits per character.

The strings in question are stored in a special way. They are not terminated with a unicode '\0' character. Instead, the word (2 bytes) just before the address of the string stores the length of the string. The length is the number of characters, not the number of bytes.

This function assumes that the first argument on the stack is the address of the output buffer and the second is the address of the delimiter. After that come the strings ...

Get Find the Bug A Book of Incorrect Programs now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.