objective c - What does stringWithUTF8String do? -


so have done searching around see was doing code, , couldn't find answers 1 specific line of code does.

nsstring* name = [nsstring stringwithutf8string:countryname]; 

i know rest (i had google how part), supposed take char* (countryname) , turn nsstring later on can compare

isequaltostring: 

thing. know following doing char, , utf8string mean?

i have barely objective c programming experience feedback helpful :d

you not totally right. method

returns string created copying data given c array of utf8-encoded bytes.

so, utf-8 string here c array of bytes.

check documentation here.


Comments