Programming
DE
Missing Characters
['Derick Rethans']
Derick Rethans
Its algorithm first calculates how much memory the resulting string would use by looping over the source characters, and adding the lengths of the escaped characters together.
The first row shows that byte 0's escaped length will be 4 (for � ) and the LF character's escaped length will be 5 (for ).
Then in a second iteration it loops over all the source characters again to construct the resulting output.
If the destination length is not 1 , then it adds the number of characters that correspond to the destination character's length.
This then resulted in these characters to just be ignored, and not copied over into the destination string.
['missing'
'font'
'character'
'length'
'source'
'destination'
'string'
'meant'
'table'
'characters'
'escaped'
'derick'
'rethans']