What is the difference between string and nsstring?
Answer / Parvez Aalam
In Objective-C, both String and NSString are used to represent text. However, they have some differences:
1. String: It is a C-based Foundation framework class, which is not object-oriented and has no methods or properties for common string operations like length, substring, etc. On the other hand, it is more efficient due to being C based.
2. NSString: It is an Objective-C runtime class, which provides many useful string handling capabilities such as conversion, comparison, searching, and mutation. However, it is less efficient than String because it is object-oriented.
| Is This Answer Correct ? | 0 Yes | 0 No |
Is objective c type safe?
What is objective c programming used for?
Explain mutable types in objective c programming language?
What is objective c and swift?
What is meant by not thread safe?
What is the difference between method and type?
What is inheritance in objective c?
Is struct a class?
What is difference between objective c and c?
What is abstract class in objective c?
Is objective c faster than swift?
What are the size classes?