-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiwchar_trait.h
50 lines (50 loc) · 1.38 KB
/
iwchar_trait.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//#pragma once
//#include <cassert>
//#include<cmath>
//#include <cstddef>
//#include <cwctype>
//#include <ostream>
//#include <string>
//using std::allocator;
//using std::basic_string;
//using std::char_traits;
//using std::size_t;
//using std::towlower;
//using std::towupper;
//using std::wostream;
//using std::wstring;
//struct iwchar_traits:char_traits<wchar_t>{
// static bool eq(wchar_t c1st,wchar_t c2nd){
// return towupper(c1st)==towupper(c2nd);
// }
// static bool ne(wchar_t c1st,wchar_t c2nd){
// return !eq(c1st,c2nd);
// }
// static bool lt(wchar_t c1st,wchar_t c2nd){
// return towupper(c1st)<towupper(c2nd);
// }
// static int compare(const wchar_t *str1,const wchar_t*str2,size_t n){
// for(size_t i=0;i<n;i++){
// if(str1==0)return -1;
// else if(str2==0) return 1;
// else if(towupper(*str1)<towupper(*str2))return -1 ;
// else if(towupper(*str1)>towupper(*str2)) return 1;
// assert(towlower(*str1)==towlower(*str2));
//
// str1++;str2++;
// }
// return 0;
// }
// static const wchar_t*find(const wchar_t*s1,size_t n,wchar_t c){
// while(n-->0)
// if(towupper(*s1)==towupper(c)) return s1;
// else
// ++s1;
// return 0;
// }
//};
//typedef basic_string<wchar_t,iwchar_traits> iwstring;
//inline wostream& operator <<(wostream& os,const iwstring &s){
// return os<<wstring(s.c_str(),s.length());
//}
//