diff options
| author | Vincent Reher <tde@4reher.org> | 2023-06-22 09:22:42 -0700 |
|---|---|---|
| committer | Vincent Reher <tde@4reher.org> | 2023-06-22 09:28:23 -0700 |
| commit | f0cff95fb1b30b7820fdb51949f291d7e56a8fd0 (patch) | |
| tree | 2b2e19d08354307849f7272b8ce52598bfa9a24f /tdecore/tequivchars.h | |
| parent | e11968425debab2d1f12d033aca8493d1da145ce (diff) | |
| download | tdelibs-f0cff95fb1b30b7820fdb51949f291d7e56a8fd0.tar.gz tdelibs-f0cff95fb1b30b7820fdb51949f291d7e56a8fd0.zip | |
This new branch is a follow-up to the latest and
final commit to branch issue/270/tdelibs-V3.
It includes the following files that were mistakenly
omitted in that commit:
tdecore/CMakeLists.txt
tdecore/README.tdestringmatcher
tdecore/tdeglobal.cpp
tdecore/tdeglobal.h
tdecore/tdestringmatcher.cpp
tdecore/tdestringmatcher.h
tdeio/tdeio/tdefileitem.cpp
tdeio/tdeio/tdefileitem.h
It also includes updates to the following files, some
of which are based on recent feedback from @MicheleC:
tdecore/tequivchars-mapping.h
tdecore/tequivchars.cpp
tdecore/tequivchars.h
Signed-off-by: Vincent Reher <tde@4reher.org>
Diffstat (limited to 'tdecore/tequivchars.h')
| -rw-r--r-- | tdecore/tequivchars.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tdecore/tequivchars.h b/tdecore/tequivchars.h new file mode 100644 index 000000000..0b933ae7a --- /dev/null +++ b/tdecore/tequivchars.h @@ -0,0 +1,34 @@ +#ifndef TEQUIVCHARS_H +#define TEQUIVCHARS_H + +#include "tdelibs_export.h" + +#include <tqstring.h> + +/** + * Class representing a mapping of each alphanumeric character to its "collating + * equivalent" as defined by the Default Unicode Collation Entity Table (DUCET). + * The mapping is limited to single-codepoint characters <= U+FFFF. + */ +class TDECORE_EXPORT TEquivChars +{ +public: + TEquivChars(); + ~TEquivChars(); + + /** + @return copy of @param inputString modified such that each alphanumeric + character is replaced with it's collating character equivalent. If the + value @param isRegex is true, the input string is treated as a regular + expression and the alphabetical characters inside Posix bracket [::] + expressions are left as-is + */ + TQString replaceChars( const TQString &inputString, bool isRegex = false ); + + +private: + + class TEquivChars_Private *p; +}; + +#endif // TEQUIVCHARS_H |
