Home | History | Annotate | Download | only in strings
      1 // Copyright 2013 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #include "base/strings/string_util.h"
      6 
      7 namespace base {
      8 
      9 #define WHITESPACE_UNICODE \
     10   0x0009, /* <control-0009> to <control-000D> */ \
     11   0x000A,                                        \
     12   0x000B,                                        \
     13   0x000C,                                        \
     14   0x000D,                                        \
     15   0x0020, /* Space */                            \
     16   0x0085, /* <control-0085> */                   \
     17   0x00A0, /* No-Break Space */                   \
     18   0x1680, /* Ogham Space Mark */                 \
     19   0x180E, /* Mongolian Vowel Separator */        \
     20   0x2000, /* En Quad to Hair Space */            \
     21   0x2001,                                        \
     22   0x2002,                                        \
     23   0x2003,                                        \
     24   0x2004,                                        \
     25   0x2005,                                        \
     26   0x2006,                                        \
     27   0x2007,                                        \
     28   0x2008,                                        \
     29   0x2009,                                        \
     30   0x200A,                                        \
     31   0x200C, /* Zero Width Non-Joiner */            \
     32   0x2028, /* Line Separator */                   \
     33   0x2029, /* Paragraph Separator */              \
     34   0x202F, /* Narrow No-Break Space */            \
     35   0x205F, /* Medium Mathematical Space */        \
     36   0x3000, /* Ideographic Space */                \
     37   0
     38 
     39 const wchar_t kWhitespaceWide[] = {
     40   WHITESPACE_UNICODE
     41 };
     42 
     43 const char16 kWhitespaceUTF16[] = {
     44   WHITESPACE_UNICODE
     45 };
     46 
     47 const char kWhitespaceASCII[] = {
     48   0x09,    // <control-0009> to <control-000D>
     49   0x0A,
     50   0x0B,
     51   0x0C,
     52   0x0D,
     53   0x20,    // Space
     54   0
     55 };
     56 
     57 const char kUtf8ByteOrderMark[] = "\xEF\xBB\xBF";
     58 
     59 }  // namespace base
     60