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 ...
18 #include "support/types.h"
20 /// return true if the char is a line separator
22 bool isLineSeparatorChar(lyx::char_type c)
28 /// return true if a char is alphabetical (including accented chars)
30 bool isLetterChar(lyx::char_type c)
32 return (c >= 'A' && c <= 'Z')
33 || (c >= 'a' && c <= 'z')
34 || (c >= 192 && c < 256); // in iso-8859-x these are accented chars
38 /// return true if the char is printable (masked to 7-bit ASCII)
40 bool isPrintable(lyx::char_type c)
42 return (c & 127) >= ' ';
46 /// return true if the char is printable and not a space (masked to 7-bit ASCII)
48 bool isPrintableNonspace(lyx::char_type c)
50 return isPrintable(c) && c != ' ';
53 /// return true if a unicode char is a digit.
55 bool isDigit(lyx::char_type ch)
57 return ch >= '0' && ch <= '9';