Re: return string that is the difference between two other strings
Re: return string that is the difference between two other strings
- Subject: Re: return string that is the difference between two other strings
- From: Diederik Meijer | Ten Horses <email@hidden>
- Date: Sun, 21 Sep 2014 08:24:40 +0200
I do a lot of text data mining and need similar functions a lot. I would start on a word by word level, to have whatever it returns be more meaningfull
Verstuurd vanaf mijn iPhone
> Op 20 sep. 2014 om 19:43 heeft Scott Ribe <email@hidden> het volgende geschreven:
>
>> On Sep 20, 2014, at 11:13 AM, 2551 <email@hidden> wrote:
>>
>> For example:
>>
>> NSString *mary = @"mary had a little lamb, a little lamb she had";
>> NSString *scary = @"mary had a little lamb, a little naughty fella of a lamb she had for sure";
>> NSString *isDifferent = [self getDifference:mary and: scary];
>> NSLog(@"%@", isDifferent);
>>
>> The method I posted below produces the difference that I want ("naughty fella of a for sure"). But I want to know if there's a more orthodox and robust solution.
>
> That's not even remotely close to a definition of what you mean. What about:
>
> @"mary had a little lamb, a little naughty lamb she had"
>
> vs
>
> @"mary had a little lamb, a little fella of a lamb she had for sure"
>
> ?
>
> Or:
>
> @"mary had a little lamb, a naughty little lamb she had"
>
> vs
>
> @"mary had a big lamb, a little fella of a lamb she had for sure"
>
> There is no simple definition of "the difference between two strings", and I don't think it's a basic need at all.
>
> --
> Scott Ribe
> email@hidden
> http://www.elevated-dev.com/
> (303) 722-0567 voice
>
>
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden