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

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

svn:eol-styleとsvn:mime-type(文字コード指定含む)の設定

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/plain; charset=Shift_JIS
File size: 589 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.