forum

Home / DeveloperSection / Forums / Assign blank if String is NULL in Objective-C

Assign blank if String is NULL in Objective-C

Anonymous User 1564 07-Dec-2015

I am new in iOS app development. I want to print string if string variable is null.
I am trying this code:(C#)

strObj = strObj??string.Empty;

In this code if strObj is null, value of string.Empty (for ex: string: "") will be assigned.
So how can I achieve this in Objective-C?


Updated on 08-Dec-2015
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By