August 18th, 2003, 02:21 AM
PHP translation .=
whats the equivalent to .= in C++ as it is in PHP?
August 18th, 2003, 04:01 AM
The process of appending a string is pretty much:
Calculate memory space needed to store the 2 strings (strlen(str1)+strlen(str2)+1), if the destination memory doesn't have enough free spaces then allocate the memory, move the character arrays to the new memory location and discarding previously used memory. (remove first string's NULL termination); otherwise copy the source character array into the destination's free space.