Reuse, not rework

License Awareness

Highly Reusable Software

By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Integer, Floating point, Matrix, Statistics, Boolean, ...

Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...


librock_BTSinlist - Find a blank terminated word in a word list.

#License - #Source code - #Example Use -


#include <librock/parse.h>

librock_BTSinlist(const char *bts,const char *list);


Finds a word in a space- or tab-separated word list. Returns an integer corresponding to the position in the list. Returns 0 if not found.

Typical use is to recognize keywords from a list.

#ifdef librock_TYPICAL_USE_BTSinlist
    char *keywords ="one two three four";
    int i;
    i = librock_BTSinlist("one",keywords);
    if (i) {
        printf("Found at word %d\n",i);
    } else {
        printf("Did not recognize\n");


  librock_countbl() librock_counttowh()


  Copyright 1998-2004 Forrest J. Cavalier III,
  Open-source under MIT license. NO WARRANTY. Copies must retain this block.
  License, originals, details:

Source Code

./text/compsearch/strfn.c (implementation, plus source of this manual page)

This software is part of Librock

Rapid reuse, without rework. Details
This page copyright (C) 2002-2004 Forrest J. Cavalier III, d-b-a Mib Software, Saylorsburg PA 18353, USA

Verbatim copying and distribution of this generated page is permitted in any medium provided that no changes are made.
(The source of this manual page may be covered by a more permissive license which allows modifications.)

Want to help? We welcome comments, patches. -- Need help? Request paid support.