[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Q: what is a fast way to see if an 'item' is present in an array?
From: |
strombrg |
Subject: |
Re: Q: what is a fast way to see if an 'item' is present in an array? |
Date: |
Tue, 16 Feb 2016 21:12:30 -0800 (PST) |
User-agent: |
G2/1.0 |
On Monday, February 15, 2016 at 7:59:35 PM UTC-8, Linda Walsh wrote:
> I has a little 4 line func that returns true or false
> if a string was in an array
Arrays aren't really a great datastructure for testing presence and absence in.
An associative array / dictionary / hash is better.
Consider:
http://stromberg.dnsalias.org/~strombrg/database/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Q: what is a fast way to see if an 'item' is present in an array?,
strombrg <=