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

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









Related Tutorials/Questions & Answers:
How to write Example code for comparing Strings in iPhone SDK?
iPhone SDK Comparing Strings
Advertisements
Iphone Comparing Strings
How to write Example code for CRUD application in hibernate annotation?
Comparing strings - Java Beginners
how to write code for this output?
uialertview example iphone
How to write first example in Ajax?
Comparing Strings in a Locale-Independent Way
How to write first JSP Hello World example?
how to write a programm in C for included code below
How to write jsp/servlet code to integrate LINKDIN?
How to write the code for date in swings - Struts
How to write a session code - Java Beginners
How to write a error.jsp code - Java Beginners
info button iphone example
iPhone - MFMailcomposeviewcontroller example
How to write hello world example program in Hibernate?
How to Write to a File in Java without overwriting
How to write the junit test code for the following controller code
UINavigationBar Color - iPhone example
how to write weighted moving average code using 2d-array
Comparing two Dates in Java with the use of before method
Character Comparison Example
how to write function of copy from one to another location in this code
write code in c#
MapView Example in iPhone
iPhone Radio Button Example
Current Date iPhone SDK
how to write a code for oracle database connection in asp.net for validation.
Hire developers to write an iPhone Android application
example code
Write JQUERY Code
Write JQUERY Code
help to write java code
help to write java code
strings
String comparison example
compare two strings in java
How to Make iPhone Window Application
how to write the coding for converting the database data for example population into any type of graph using jsp and servlets?//
MPVolumeView Example code
How to Convert NSStringe into Uppercasestring iPhone
Iphone hello world example
I need jsp code for how to write text field value into property file.
How to write in File in Java
How to Create Segment Application with iPhone
Example Code
Can i write JavaScript code in AjaxResponse Code ?
ModuleNotFoundError: No module named 'write-about-code'

Ads