Skip to content

Commit 39a891f

Browse files
committed
Strange file content.
1 parent 315209f commit 39a891f

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

File-Content.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# File Content
2+
3+
I have a letter: `letter.txt`
4+
5+
```txt
6+
Hi
7+
8+
My name is Anduin.
9+
10+
Bye
11+
```
12+
13+
I read it:
14+
15+
```powershell
16+
$myLetter=cat letter.txt
17+
```
18+
19+
Seems fine:
20+
21+
```powershell
22+
echo $myLetter
23+
24+
Hi
25+
26+
My name is Anduin.
27+
28+
Bye.
29+
```
30+
31+
I check if it contains `Hi`:
32+
33+
```powershell
34+
$myLetter.Contains("Hi");
35+
```
36+
37+
The output is:
38+
39+
```PowerShell
40+
True
41+
```
42+
43+
But if I check if it contains `name`:
44+
45+
```powershell
46+
$myLetter.Contains("name");
47+
```
48+
49+
The output is:
50+
51+
```PowerShell
52+
False
53+
```
54+
55+
What a strange behavior of PowerShell! 😲
56+
57+
> Repro env: Windows 10, PowerShell Core 7.0.3

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# What the fuck with PowerShell
22

3+
* [Strange File](File-Content.md)
34
* [Contains](Contains.md)
45
* [Null is not null](Null-Is-Not-Null.md)
56
* [Guess my type](Gusss-my-type.md)

0 commit comments

Comments
 (0)