summaryrefslogtreecommitdiffstats
path: root/tdecore/tequivchars.h
diff options
context:
space:
mode:
Diffstat (limited to 'tdecore/tequivchars.h')
-rw-r--r--tdecore/tequivchars.h34
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