(svn r23590) -Codechange: make the string validation settings better expandable

This commit is contained in:
rubidium
2011-12-18 18:37:54 +00:00
parent 6ae8cac432
commit fefe22b4aa
8 changed files with 24 additions and 14 deletions

View File

@@ -12,6 +12,8 @@
#ifndef STRING_TYPE_H
#define STRING_TYPE_H
#include "core/enum_type.hpp"
/** A non-breaking space. */
#define NBSP "\xC2\xA0"
@@ -42,4 +44,12 @@ static const WChar CHAR_TD_LRO = 0x202D; ///< Force the following characters to
static const WChar CHAR_TD_RLO = 0x202E; ///< Force the following characters to be treated as right-to-left characters.
static const WChar CHAR_TD_PDF = 0x202C; ///< Restore the text-direction state to before the last LRE, RLE, LRO or RLO.
/** Settings for the string validation. */
enum StringValidationSettings {
SVS_NONE = 0, ///< Allow nothing and replace nothing.
SVS_REPLACE_WITH_QUESTION_MARK = 1 << 0, ///< Replace the unknown/bad bits with question marks.
SVS_ALLOW_NEWLINE = 1 << 1, ///< Allow newlines.
};
DECLARE_ENUM_AS_BIT_SET(StringValidationSettings);
#endif /* STRING_TYPE_H */