• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: hasSuffix and new line characters.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hasSuffix and new line characters.


  • Subject: Re: hasSuffix and new line characters.
  • From: Anthony Duer <email@hidden>
  • Date: Thu, 3 Apr 2003 12:23:21 -0800

If that is the case, then it is right that it return false, because the string doesn't end with "none", it ends with "none\n"

I've have a string of: "Obvious items: none\n" When I append it to my NSTextView, it creates a new line per the \n on the back of it. However, while I'm processing the string, calling hasSuffix: @"none\n" doesn't seem to return true no matter which way I try it. I tried ever combination I could for it, with/without the \n, nothing worked.

NSString *check = @"Obvious exits: none\n";
NSLog(@"%i", [check hasSuffix: @"none\n"]);

~Anthony Duer
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: hasSuffix and new line characters.
      • From: "Clark S. Cox III" <email@hidden>
References: 
 >Re: hasSuffix and new line characters. (From: "Clark S. Cox III" <email@hidden>)

  • Prev by Date: Re: Rendering an NSControl into a NSImage? (resolved)
  • Next by Date: Re: Bringing an NSTask forward
  • Previous by thread: Re: hasSuffix and new line characters.
  • Next by thread: Re: hasSuffix and new line characters.
  • Index(es):
    • Date
    • Thread