# string_type.h

Go to the documentation of this file.

    00001 /* $Id: string_type.h 21047 2010-10-27 20:15:18Z rubidium $ */
    00002
    00003 /*
    00004  * This file is part of OpenTTD.
    00005  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
    00006  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    00007  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
    00008  */
    00009
    00012 #ifndef STRING_TYPE_H
    00013 #define STRING_TYPE_H
    00014
    00016 #define NBSP "\xC2\xA0"
    00017
    00019 #define LRM "\xE2\x80\x8E"
    00020
    00024 enum CharSetFilter {
    00025   CS_ALPHANUMERAL,
    00026   CS_NUMERAL,
    00027   CS_NUMERAL_SPACE,
    00028   CS_ALPHA,
    00029 };
    00030
    00031 typedef uint32 WChar;
    00032
    00033 /* The following are directional formatting codes used to get the LTR and RTL strings right:
    00034  * http://www.unicode.org/unicode/reports/tr9/#Directional_Formatting_Codes */
    00035 static const WChar CHAR_TD_LRM = 0x200E;
    00036 static const WChar CHAR_TD_RLM = 0x200F;
    00037 static const WChar CHAR_TD_LRE = 0x202A;
    00038 static const WChar CHAR_TD_RLE = 0x202B;
    00039 static const WChar CHAR_TD_LRO = 0x202D;
    00040 static const WChar CHAR_TD_RLO = 0x202E;
    00041 static const WChar CHAR_TD_PDF = 0x202C;
    00042
    00043 #endif /* STRING_TYPE_H */