Skip to content

Commit f03d8bb

Browse files
committed
๐Ÿ”จ ์ž˜๋ชป๋œ ์ค„๋ฐ”๊ฟˆ ์ˆ˜์ •
1 parent 949fb7a commit f03d8bb

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

โ€Ži-features-of-visual-studio-editor/README.mdโ€Ž

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,49 @@ size_t cnt = std::count_if(v.begin(),
3535
});
3636
```
3737
38+
>
3839
> template \<typename StringT = std::wstring_view\>
40+
>
3941
> struct CaseInsensitiveEqual
42+
>
4043
> {
44+
>
4145
> bool operator()(StringT const& lhs, StringT const& rhs) const
46+
>
4247
> {
48+
>
4349
> using namespace std;
50+
>
4451
> return lhs.size() == rhs.size()
52+
>
4553
> && equal(lhs.begin(),
54+
>
4655
> lhs.end(),
56+
>
4757
> rhs.begin(),
58+
>
4859
> \[\](auto l, auto r) {
60+
>
4961
> return tolower(l) == tolower(r);
62+
>
5063
> });
64+
>
5165
> }
66+
>
5267
> };
5368
>
69+
>
70+
>
5471
> size_t cnt = std\:\:count_if(v.begin(),
72+
>
5573
> v.end(),
74+
>
5675
> \[\](auto const& str) {
76+
>
5777
> return CaseInsensitiveEqual\<
78+
>
5879
> decltype(v)\:\:value_type\> {}(str, "hello");
80+
>
5981
> });
6082
6183
๋„ˆ๋น„๊ฐ€ ๊ฐ™์€ ํฐํŠธ๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๊ฐ ์ค„์˜ ๋“ค์—ฌ์“ฐ๊ธฐ๋ฅผ ๋งž์ถœ ์ˆ˜ ์žˆ๋Š” ๊ฒƒ์— ๋ฐ˜ํ•ด, ๋„ˆ๋น„๊ฐ€ ์„œ๋กœ ๋‹ค๋ฅด๋ฉด ๋“ค์—ฌ์“ฐ๊ธฐ์˜ ๊ฐ„๊ฒฉ์„ ์กฐ์ ˆํ•˜๊ธฐ ํž˜๋“ค๋‹ค๋Š” ๊ฒƒ์„ ์•Œ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

0 commit comments

Comments
ย (0)