mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-13 06:20:28 +00:00
0418d14704
* src/support/lstrings.C (uppercase): Use qt instead of non working libc/home grown solution (lowercase): ditto (local_lowercase): Use qt instead of libc tolower for ucs4 chars * src/support/qstring_helpers.C (qstring_to_ucs4): Use qchar_to_ucs4 because of the assertion * src/support/lstrings.h: Add some documentation * src/support/qstring_helpers.h (is_utf16): New function: Tests whether an ucs4 character is also a valid utf16 character (qchar_to_ucs4): Assert on is_utf16() (ucs4_to_qchar): Replace old assertion with better is_utf16() * src/support/textutils.h (isLetterChar): Delete non-working implementation (isPrintable): Ditto (isPrintableNonspace): Ditto (isDigit): * src/support/textutils.C: New file, contains new implementations using qt of the functions in textutils.h * src/support/Makefile.am: Add textutils.C * development/scons/scons_manifest.py: ditto git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17354 a592a061-630c-0410-9148-cb99ea01b6c8
45 lines
927 B
C++
45 lines
927 B
C++
// -*- C++ -*-
|
|
/**
|
|
* \file textutils.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Matthias Ettrich
|
|
* \author Lars Gullik Bjønnes
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
// FIXME: I can think of a better name for this file ...
|
|
|
|
#ifndef TEXTUTILS_H
|
|
#define TEXTUTILS_H
|
|
|
|
#include "support/types.h"
|
|
|
|
|
|
namespace lyx {
|
|
|
|
/// return true if the char is a line separator
|
|
inline
|
|
bool isLineSeparatorChar(char_type c)
|
|
{
|
|
return c == ' ';
|
|
}
|
|
|
|
/// return true if a char is alphabetical (including accented chars)
|
|
bool isLetterChar(char_type c);
|
|
|
|
/// return true if the char is printable
|
|
bool isPrintable(char_type c);
|
|
|
|
/// return true if the char is printable and not a space
|
|
bool isPrintableNonspace(char_type c);
|
|
|
|
/// return true if a unicode char is a digit.
|
|
bool isDigit(char_type c);
|
|
|
|
} // namespace lyx
|
|
|
|
#endif // TEXTUTILS_H
|