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"
23 /// return true if the char is a line separator
25 bool isLineSeparatorChar(lyx::char_type c)
31 /// return true if a char is alphabetical (including accented chars)
33 bool isLetterChar(lyx::char_type c)
35 return (c >= 'A' && c <= 'Z')
36 || (c >= 'a' && c <= 'z')
37 || (c >= 192 && c < 256); // in iso-8859-x these are accented chars
41 /// return true if the char is printable (masked to 7-bit ASCII)
43 bool isPrintable(lyx::char_type c)
45 return (c & 127) >= ' ';
49 /// return true if the char is printable and not a space (masked to 7-bit ASCII)
51 bool isPrintableNonspace(lyx::char_type c)
53 return (c & 127) > ' ';
56 /// return true if a unicode char is a digit.
58 bool isDigit(lyx::char_type ch)
60 return ch >= '0' && ch <= '9';