How to write Example code for comparing Strings in iPhone SDK?

Ads
 

How to write Example code for comparing Strings in iPhone SDK?

I have an object of NSString class and I want to compare it with another NSString object.

How to compare NSString object with another NSSTring object?

Thanks

View Answers

April 1, 2015 at 4:31 AM

The NSString object provides a method isEqualToString which is used to compare the two string.

Following code can be used:

if([str1 isEqualToString: str2]){

This method compares the string with the str2 and returns TRUE if it is equal and FALSE if it is not matching.

Check the complete code with examples at iPhone SDK Comparing Strings.

Thanks

Ads









Related Tutorials/Questions & Answers:
How to write Example code for comparing Strings in iPhone SDK?
Iphone Comparing Strings
Advertisements
How to write Example code for CRUD application in hibernate annotation?
how to write code for this output?
How to write first example in Ajax?
uialertview example iphone
How to write jsp/servlet code to integrate LINKDIN?
how to write a programm in C for included code below
How to write first JSP Hello World example?
How to Write to a File in Java without overwriting
How to write the junit test code for the following controller code
How to write hello world example program in Hibernate?
how to write function of copy from one to another location in this code
Character Comparison Example
Comparing two Dates in Java with the use of before method
info button iphone example
iPhone - MFMailcomposeviewcontroller example
how to write a code for oracle database connection in asp.net for validation.
How to Make iPhone Window Application
How to Convert NSStringe into Uppercasestring iPhone
How to write in File in Java
I need jsp code for how to write text field value into property file.
How to Create Segment Application with iPhone
write code in c#
strings
how to write the coding for converting the database data for example population into any type of graph using jsp and servlets?//
iPhone Radio Button Example
How to set NSZombieEnabled iPhone
Write JQUERY Code
Write JQUERY Code
Hire developers to write an iPhone Android application

Ads