QuickSearch
Algorithm
Site Map Feedback

Download:

Up Binary Chop Checksums Time QuickSearch Word Finder

The QuickSearch Algorithm

Quicksearch is a Quick and simple method of finding strings within strings without needing them to be Null Terminated.
A 1kB look-up table is used.
Usage:
      CQuickSearch QS("GCATCGCAGAGAGTATACAGTAGCAGAGAGCG","GCAGAGAG");
      Assert(QS.FindNext()==5);
      Assert(QS.FindNext()==22);
      Assert(QS.FindNext()==-1);
      Assert(QS.Find()==5);

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


 (1711) Last modified: Tue, 03 Feb 2009 18:26:38 +0000