Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
333 views
in Technique[技术] by (71.8m points)

iphone - How do I escape a Unicode character in my Objective-C source code?

I feel incredibly stupid for asking this, but the documentation and Google are giving me no love at all.

I have a Unicode character I want to insert into a string literal in the source code of my iPhone app. I know its hex value. What is the proper escape sequence to use? And for that matter, what obvious source of information am I overlooking that would have told me this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Example:

NSString *stuff = @"The Greek letter Beta looks like this: u03b2, and the emoji for books looks like this: U0001F4DA";

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...