author | peter1138 |
Tue, 22 Jan 2008 07:27:06 +0000 | |
changeset 8374 | 7a1b6c89cb89 |
parent 7405 | 2fd57f130eca |
child 9111 | 48ce04029fe4 |
permissions | -rw-r--r-- |
7116
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
1 |
/* $Id$ */ |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
2 |
|
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
3 |
/** @file strapi.hpp */ |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
4 |
|
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
5 |
#ifndef STRAPI_HPP |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
6 |
#define STRAPI_HPP |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
7 |
|
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
8 |
#include <string.h> |
7255
31eec725265f
(svn r10562) -Fix: most of the MorphOS issues; MorphOS doesn't know about wchars, so disable all code that has to use wchars for MorphOS.
rubidium
parents:
7116
diff
changeset
|
9 |
|
31eec725265f
(svn r10562) -Fix: most of the MorphOS issues; MorphOS doesn't know about wchars, so disable all code that has to use wchars for MorphOS.
rubidium
parents:
7116
diff
changeset
|
10 |
#if defined(HAS_WCHAR) |
7116
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
11 |
#include <wchar.h> |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
12 |
|
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
13 |
#if !defined(_MSC_VER) |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
14 |
#define _stricmp strcmp |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
15 |
#define _wcsicmp wcscmp |
7255
31eec725265f
(svn r10562) -Fix: most of the MorphOS issues; MorphOS doesn't know about wchars, so disable all code that has to use wchars for MorphOS.
rubidium
parents:
7116
diff
changeset
|
16 |
#endif /* !defined(_MSC_VER) */ |
31eec725265f
(svn r10562) -Fix: most of the MorphOS issues; MorphOS doesn't know about wchars, so disable all code that has to use wchars for MorphOS.
rubidium
parents:
7116
diff
changeset
|
17 |
#endif /* HAS_WCHAR */ |
7116
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
18 |
|
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
19 |
/** String API mapper base - just mapping by character type, not by case sensitivity yet. |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
20 |
* Class template CStrApiBaseT declaration is general, but following inline method |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
21 |
* definitions are specialized by character type. Class is not used directly, but only |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
22 |
* as a base class for template class CStrApiT */ |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
23 |
template <typename Tchar> |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
24 |
class CStrApiBaseT |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
25 |
{ |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
26 |
public: |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
27 |
/** ::strlen wrapper */ |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
28 |
static size_t StrLen(const Tchar *s); |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
29 |
static int SPrintFL(Tchar *buf, size_t count, const Tchar *fmt, va_list args); |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
30 |
}; |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
31 |
|
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
32 |
/** ::strlen wrapper specialization for char */ |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
33 |
template <> /*static*/ inline size_t CStrApiBaseT<char>::StrLen(const char *s) |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
34 |
{ |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
35 |
return ::strlen(s); |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
36 |
} |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
37 |
|
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
38 |
/** ::vsprintf wrapper specialization for char */ |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
39 |
template <> /*static*/ inline int CStrApiBaseT<char>::SPrintFL(char *buf, size_t count, const char *fmt, va_list args) |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
40 |
{ |
7405
2fd57f130eca
(svn r10778) -Fix: one-liners to allow MSVC and WINCE to work together (or anyway, a step towards that goal)
truelight
parents:
7255
diff
changeset
|
41 |
#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(WINCE) // VC 8.0 and above |
7116
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
42 |
return ::vsnprintf_s(buf, count, count - 1, fmt, args); |
7255
31eec725265f
(svn r10562) -Fix: most of the MorphOS issues; MorphOS doesn't know about wchars, so disable all code that has to use wchars for MorphOS.
rubidium
parents:
7116
diff
changeset
|
43 |
#else /* ! VC 8.0 and above */ |
7116
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
44 |
return ::vsnprintf(buf, count, fmt, args); |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
45 |
#endif |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
46 |
} |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
47 |
|
7255
31eec725265f
(svn r10562) -Fix: most of the MorphOS issues; MorphOS doesn't know about wchars, so disable all code that has to use wchars for MorphOS.
rubidium
parents:
7116
diff
changeset
|
48 |
#if defined(HAS_WCHAR) |
31eec725265f
(svn r10562) -Fix: most of the MorphOS issues; MorphOS doesn't know about wchars, so disable all code that has to use wchars for MorphOS.
rubidium
parents:
7116
diff
changeset
|
49 |
/** ::strlen wrapper specialization for wchar_t */ |
31eec725265f
(svn r10562) -Fix: most of the MorphOS issues; MorphOS doesn't know about wchars, so disable all code that has to use wchars for MorphOS.
rubidium
parents:
7116
diff
changeset
|
50 |
template <> /*static*/ inline size_t CStrApiBaseT<wchar_t>::StrLen(const wchar_t *s) |
31eec725265f
(svn r10562) -Fix: most of the MorphOS issues; MorphOS doesn't know about wchars, so disable all code that has to use wchars for MorphOS.
rubidium
parents:
7116
diff
changeset
|
51 |
{ |
31eec725265f
(svn r10562) -Fix: most of the MorphOS issues; MorphOS doesn't know about wchars, so disable all code that has to use wchars for MorphOS.
rubidium
parents:
7116
diff
changeset
|
52 |
return ::wcslen(s); |
31eec725265f
(svn r10562) -Fix: most of the MorphOS issues; MorphOS doesn't know about wchars, so disable all code that has to use wchars for MorphOS.
rubidium
parents:
7116
diff
changeset
|
53 |
} |
31eec725265f
(svn r10562) -Fix: most of the MorphOS issues; MorphOS doesn't know about wchars, so disable all code that has to use wchars for MorphOS.
rubidium
parents:
7116
diff
changeset
|
54 |
|
7116
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
55 |
/** ::vsprintf wrapper specialization for wchar_t */ |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
56 |
template <> /*static*/ inline int CStrApiBaseT<wchar_t>::SPrintFL(wchar_t *buf, size_t count, const wchar_t *fmt, va_list args) |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
57 |
{ |
7405
2fd57f130eca
(svn r10778) -Fix: one-liners to allow MSVC and WINCE to work together (or anyway, a step towards that goal)
truelight
parents:
7255
diff
changeset
|
58 |
#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(WINCE) // VC 8.0 and above |
7116
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
59 |
return ::_vsnwprintf_s(buf, count, count - 1, fmt, args); |
7255
31eec725265f
(svn r10562) -Fix: most of the MorphOS issues; MorphOS doesn't know about wchars, so disable all code that has to use wchars for MorphOS.
rubidium
parents:
7116
diff
changeset
|
60 |
#else /* ! VC 8.0 and above */ |
7116
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
61 |
# if defined(_WIN32) |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
62 |
return ::_vsnwprintf(buf, count, fmt, args); |
7255
31eec725265f
(svn r10562) -Fix: most of the MorphOS issues; MorphOS doesn't know about wchars, so disable all code that has to use wchars for MorphOS.
rubidium
parents:
7116
diff
changeset
|
63 |
# else /* !_WIN32 */ |
7116
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
64 |
return ::vswprintf(buf, count, fmt, args); |
7255
31eec725265f
(svn r10562) -Fix: most of the MorphOS issues; MorphOS doesn't know about wchars, so disable all code that has to use wchars for MorphOS.
rubidium
parents:
7116
diff
changeset
|
65 |
# endif /* !_WIN32 */ |
7116
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
66 |
#endif |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
67 |
} |
7255
31eec725265f
(svn r10562) -Fix: most of the MorphOS issues; MorphOS doesn't know about wchars, so disable all code that has to use wchars for MorphOS.
rubidium
parents:
7116
diff
changeset
|
68 |
#endif /* HAS_WCHAR */ |
7116
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
69 |
|
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
70 |
|
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
71 |
|
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
72 |
template <typename Tchar, bool TcaseInsensitive> |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
73 |
class CStrApiT : public CStrApiBaseT<Tchar> |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
74 |
{ |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
75 |
public: |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
76 |
static int StrCmp(const Tchar *s1, const Tchar *s2); |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
77 |
}; |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
78 |
|
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
79 |
template <> /*static*/ inline int CStrApiT<char, false>::StrCmp(const char *s1, const char *s2) |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
80 |
{ |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
81 |
return ::strcmp(s1, s2); |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
82 |
} |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
83 |
|
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
84 |
template <> /*static*/ inline int CStrApiT<char, true>::StrCmp(const char *s1, const char *s2) |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
85 |
{ |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
86 |
return ::_stricmp(s1, s2); |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
87 |
} |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
88 |
|
7255
31eec725265f
(svn r10562) -Fix: most of the MorphOS issues; MorphOS doesn't know about wchars, so disable all code that has to use wchars for MorphOS.
rubidium
parents:
7116
diff
changeset
|
89 |
#if defined(HAS_WCHAR) |
7116
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
90 |
template <> /*static*/ inline int CStrApiT<wchar_t, false>::StrCmp(const wchar_t *s1, const wchar_t *s2) |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
91 |
{ |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
92 |
return ::wcscmp(s1, s2); |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
93 |
} |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
94 |
|
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
95 |
template <> /*static*/ inline int CStrApiT<wchar_t, true>::StrCmp(const wchar_t *s1, const wchar_t *s2) |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
96 |
{ |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
97 |
return ::_wcsicmp(s1, s2); |
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
98 |
} |
7255
31eec725265f
(svn r10562) -Fix: most of the MorphOS issues; MorphOS doesn't know about wchars, so disable all code that has to use wchars for MorphOS.
rubidium
parents:
7116
diff
changeset
|
99 |
#endif /* HAS_WCHAR */ |
7116
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
100 |
|
6fc23a78df05
(svn r10389) -Add: CStrA, CStrCiA, CStrW, CStrCiW - case sensitive/insensitive ANSI/UNICODE string classes that support formatted (sprintf like) output.
KUDr
parents:
diff
changeset
|
101 |
#endif /* STRAPI_HPP */ |