A better solution is a two-pass scan of the buffer: the first pass simply computes the length of the new buffer, after which we allocate the memory and copy the data with the required replacements.
一个更好的解决办法是对内存区的两段扫描:第一段只是计算新内存区的长度,随后我们分配内存和拷贝带有需要的替换的数据。
A better solution is a two-pass scan of the buffer: the first pass simply computes the length of the new buffer, after which we allocate the memory and copy the data with the required replacements.
一个更好的解决办法是对内存区的两段扫描:第一段只是计算新内存区的长度,随后我们分配内存和拷贝带有需要的替换的数据。
应用推荐