2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2000 The LyX Team.
10 * ====================================================== */
19 bool IsNewlineChar(char c) {
20 return (c == LyXParagraph::META_NEWLINE);
26 bool IsSeparatorChar(char c) {
33 bool IsHfillChar(char c) {
34 return (c == LyXParagraph::META_HFILL);
40 bool IsInsetChar(char c) {
41 return (c == LyXParagraph::META_INSET);
47 bool IsLineSeparatorChar(char c) {
54 bool IsKommaChar(char c) {
78 || c == LyXParagraph::META_NEWLINE
85 bool IsLetterChar(unsigned char c) {
86 return ((c >= 'A' && c <= 'Z')
87 || (c >= 'a' && c <= 'z')
88 || (c >= 192)); // in iso-8859-x these are accented chars
94 bool IsPrintable(unsigned char c) {
101 bool IsPrintableNonspace(unsigned char c) {
106 /// Word is not IsSeparator or IsKomma or IsHfill or IsFloat or IsInset.
108 bool IsWordChar(unsigned char c) {
109 return !( IsSeparatorChar( c )
112 || IsInsetChar( c ));
118 bool IsLetterCharOrDigit(char ch)
120 return IsLetterChar(ch) || isdigit(ch);