diff options
author | rubidium <rubidium@openttd.org> | 2010-10-22 12:15:58 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-10-22 12:15:58 +0000 |
commit | b933819b0b0f07d4f2aef590f76898b35fdea607 (patch) | |
tree | 5c1c71c2d7f98b065827e70a5f0e8dfd0efc51ce /src/string_func.h | |
parent | 2d64b482baabe88233564806fae77c875581c0f8 (diff) | |
download | openttd-b933819b0b0f07d4f2aef590f76898b35fdea607.tar.xz |
(svn r21006) -Fix (r21004): don't print the text direction character when ICU isn't linked and thus doesn't remove them
Diffstat (limited to 'src/string_func.h')
-rw-r--r-- | src/string_func.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/string_func.h b/src/string_func.h index 082543dae..b2e88f52b 100644 --- a/src/string_func.h +++ b/src/string_func.h @@ -224,6 +224,28 @@ static inline char *Utf8PrevChar(char *s) return ret; } +/** + * Is the given character a text direction character. + * @param c The character to test. + * @return true iff the character is used to influence + * the text direction. + */ +static inline bool IsTextDirectionChar(WChar c) +{ + switch (c) { + case CHAR_TD_LRM: + case CHAR_TD_RLM: + case CHAR_TD_LRE: + case CHAR_TD_RLE: + case CHAR_TD_LRO: + case CHAR_TD_RLO: + case CHAR_TD_PDF: + return true; + + default: + return false; + } +} static inline bool IsPrintable(WChar c) { |