Merge pull request #2212 from TwlyY29/bibtex-parser
[geany-mirror.git] / scintilla / lexlib / WordList.h
bloba9f2d4ab2f035442d86e2f4e7005b6f1d0094fb6
1 // Scintilla source code edit control
2 /** @file WordList.h
3 ** Hold a list of words.
4 **/
5 // Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>
6 // The License.txt file describes the conditions under which this software may be distributed.
8 #ifndef WORDLIST_H
9 #define WORDLIST_H
11 namespace Scintilla {
13 /**
15 class WordList {
16 // Each word contains at least one character - a empty word acts as sentinel at the end.
17 char **words;
18 char *list;
19 int len;
20 bool onlyLineEnds; ///< Delimited by any white space or only line ends
21 int starts[256];
22 public:
23 explicit WordList(bool onlyLineEnds_ = false);
24 ~WordList();
25 operator bool() const;
26 bool operator!=(const WordList &other) const;
27 int Length() const;
28 void Clear();
29 void Set(const char *s);
30 bool InList(const char *s) const;
31 bool InListAbbreviated(const char *s, const char marker) const;
32 bool InListAbridged(const char *s, const char marker) const;
33 const char *WordAt(int n) const;
38 #endif