This code snippet deletes a substring from a original string..

/** initialize two strings **/
NSString *string = @"This is heaven";
NSString *part = @"heaven";

/** Get the range of the substring in the original string **/
NSRange range = [string rangeOfString:part];

/** Delete the substring from the original string **/
[string deleteCharactersInRange:range];

Please leave your valuable comments………


One Comment

  1. Smartphones June 16, 2011 at 9:19 pm

    You’ve got great insights about iPhone, keep up the good work!


Leave a Reply

Your email address will not be published. Required fields are marked *




Theme by HermesThemes

Copyright © 2018 CoderzHeaven. All Rights Reserved

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.