4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Matthias Ettrich
8 * \author Lars Gullik Bjønnes
10 * Full author contact details are available in file CREDITS.
13 // FIXME: I can think of a better name for this file ...
19 /// return true if the char is a line separator
21 bool isLineSeparatorChar(char c)
27 /// return true if a char is alphabetical (including accented chars)
29 bool isLetterChar(unsigned char c)
31 return (c >= 'A' && c <= 'Z')
32 || (c >= 'a' && c <= 'z')
33 || (c >= 192); // in iso-8859-x these are accented chars
37 /// return true if the char is printable (masked to 7-bit ASCII)
39 bool isPrintable(unsigned char c)
41 return (c & 127) >= ' ';
45 /// return true if the char is printable and not a space (masked to 7-bit ASCII)
47 bool isPrintableNonspace(unsigned char c)
49 return isPrintable(c) && c != ' ';
53 /// completely pointless FIXME
55 bool isDigit(unsigned char ch)
57 return ch >= '0' && ch <= '9';