Indeed, 'a string' is a constant string you can't modify.
事实上,‘a string’是一个不能修改的常量字符串。
By using a constant string, you avoid allocating memory, copying the string, and the transcoding process.
通过使用常量字符串,可以避免分配内存、复制字符串和编码转换过程。
This can be avoided by storing the constant string into a local array and then using the array as the argument to the function.
这可以通过以下方法来避免:将常数字符串存储在某个本地数组中,然后将该数组用作函数的参数。
应用推荐