Changeset 36974 in webkit for trunk/JavaScriptCore/wtf


Ignore:
Timestamp:
Sep 26, 2008, 3:45:51 PM (17 years ago)
Author:
[email protected]
Message:

2008-09-26 Yichao Yin <[email protected]>

Reviewed by George Staikos, Maciej Stachowiak.

Add utility functions needed for upcoming WML code.

  • wtf/ASCIICType.h: (WTF::isASCIIPrintable):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/ASCIICType.h

    r36244 r36974  
    135135    inline int toASCIIHexValue(int c) { ASSERT(isASCIIHexDigit(c)); return c < 'A' ? c - '0' : (c - 'A' + 10) & 0xF; }
    136136
     137    inline bool isASCIIPrintable(char c) { return c >= ' ' && c <= '~'; }
     138    inline bool isASCIIPrintable(unsigned short c) { return c >= ' ' && c <= '~'; }
     139#if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
     140    inline bool isASCIIPrintable(wchar_t c) { return c >= ' ' && c <= '~'; }
     141#endif
     142    inline bool isASCIIPrintable(int c) { return c >= ' ' && c <= '~'; }
    137143}
    138144
Note: See TracChangeset for help on using the changeset viewer.