[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Search string in cell string?
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: Search string in cell string? |
Date: |
Tue, 6 Dec 2011 13:16:04 -0500 |
2011/12/6 Olaf Till <address@hidden>:
> On Tue, Dec 06, 2011 at 11:54:03AM -0500, Jordi Gutiérrez Hermoso wrote:
>> How can you get the index of where in a cell string a specified search
>> term occurs, if it does at all?
>>
>> Assuming the cell string were ordered, you could binary search. But
>> how can you compare strings ASCIIbetically? The strcmp function only
>> gives you equality or not, not order.
>>
>> So what can be done?
>>
>> - Jordi G. H.
>
> Have you looked at the 'lookup' function?
Perfect, thanks. I had only used it for vectors. I didn't realise it
also worked for cell strings.
- Jordi G. H.