How to use NULL character with NSString?

前端 未结 5 1072
梦毁少年i
梦毁少年i 2021-01-19 05:12

In PHP, I can call base64_encode(\"\\x00\". $username. \"\\x00\". $password) and the \"\\x00\" represents a NULL character.

Now, in Objecti

5条回答
  •  自闭症患者
    2021-01-19 05:21

    Not quite sure why this works, but instead of using @"%c" as the format string with '\0', try using @"%@" as the format string with @"\0"

提交回复
热议问题