source: dev/trunk/ab5.0/abdev/ab_common/src/Path.cpp@ 828

Last change on this file since 828 was 828, checked in by イグトランス (egtra), 12 years ago

egtraブランチの内容をマージ。

File size: 615 bytes
Line 
1#include "stdafx.h"
2#include <boost/range/algorithm.hpp>
3#include <string.h>
4#include "OSVersion.h"
5
6namespace ActiveBasic { namespace Common {
7
8bool IsPathEqual(LPCWSTR lhs, LPCWSTR rhs)
9{
10 std::vector<WCHAR> l(lhs, lhs + std::wcslen(lhs) + 1);
11 std::vector<WCHAR> r(rhs, rhs + std::wcslen(rhs) + 1);
12 if (Is9x())
13 {
14 auto const& ct = std::use_facet<std::ctype<wchar_t>>(std::locale::classic());
15 ct.toupper(l.data(), l.data() + l.size());
16 ct.toupper(r.data(), r.data() + r.size());
17 }
18 else
19 {
20 ::CharUpperW(l.data());
21 ::CharUpperW(l.data());
22 }
23 return boost::equal(l, r);
24}
25
26}}
Note: See TracBrowser for help on using the repository browser.