• 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: compare two strings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compare two strings


  • Subject: Re: compare two strings
  • From: Todd Blanchard <email@hidden>
  • Date: Sun, 1 Feb 2004 21:44:33 -0700

if([string hasSuffix: @"="]) //then it does

to bail on a loop try a break; ie

while(YES)
{
if(timeToStop) break;
}
// on break we jump to here

On Feb 1, 2004, at 4:27 PM, Sascha Kuehn wrote:

thanks! works great.

i have too other questions:

how can i check if a string ends with a "=" or any other character?
how can i leave a for-loop before it's regularly end?

sorry for that questions, but i'm new to obj-c.

sascha


On 2. Feb 2004, at 0:04 Uhr, emh wrote:

NSString* str = @"foo bar";

if ([str rangeOfString:@"foo"].location != NSNotFound) {
...
}

On Feb 1, 2004, at 2:55 PM, Sascha Kuehn wrote:

hi,

how can i check if one string contains an other string?

i.e. i will check if "foo bar" contains "foo"

sascha
_______________________________________________
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.
_______________________________________________
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.
_______________________________________________
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.

References: 
 >compare two strings (From: Sascha Kuehn <email@hidden>)
 >Re: compare two strings (From: emh <email@hidden>)
 >Re: compare two strings (From: Sascha Kuehn <email@hidden>)

  • Prev by Date: Re: [newbie] Question about combobox and his cell
  • Next by Date: Proper use of controllers
  • Previous by thread: Re: compare two strings
  • Next by thread: Re: Strange KVC behavior between 10.2 and 10.3 (bug ?)
  • Index(es):
    • Date
    • Thread