How to use NULL character with NSString?

前端 未结 5 1033
梦毁少年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:31

    stefanB's answer looks like a right option. Turns out I was passing in wrong info to make it look like \0 wasn't working

    This was ok:

    [NSString stringWithFormat:@"\0user\0pass"]
    

提交回复
热议问题