[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fast string searches

From: Tom Holroyd (NIH/NIMH) [E]
Subject: Re: fast string searches
Date: Tue, 16 Jan 2007 12:32:59 -0500
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc3 (X11/20050929)

rutiger bishop wrote:
Does anybody know of any tricks or optimized functions
for pattern matching in strings?

For the simple case of matching strings like you give, strcmp is implemented in 
C now (you were using strmatch, which is a .m file).

octave:1> s = { 'a', 'bc', 'd' };
octave:2> strcmp('d', s)
ans =

  0   0   1

Cell arrays of strings (like s) are a good way to store strings in Octave.
Tom Holroyd, Ph.D.
We experience the world not as it is, but as we expect it to be.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]