Skip to content

Commit f3d6ecf

Browse files
authored
Update README.md
1 parent f8a7c76 commit f3d6ecf

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ vector<filesystem::path> rglob(vector<string> pathnames);
7676

7777
## Example
7878

79-
Below is a short program that runs `glob` and prints the matches.
79+
Below is a short program that runs `glob` and prints matching path names.
8080

8181
***NOTE*** Replace `glob` with `rglob` if you want to glob recursively.
8282

@@ -90,6 +90,7 @@ int main(int argc, char *argv[]) {
9090
return EXIT_FAILURE;
9191
}
9292

93+
// Run glob on the vector of patterns
9394
for (auto &f : glob::glob(argv[1])) {
9495
std::cout << f << "\n";
9596
}
@@ -219,3 +220,20 @@ foo@bar:~$ ./main 'test_files_03/????[3-4].txt'
219220
"test_files_03/file3.txt"
220221
"test_files_03/file4.txt"
221222
```
223+
224+
### Case sensitivity
225+
226+
`glob` matching is case-sensitive:
227+
228+
```console
229+
foo@bar:~$ ls test_files_05
230+
file1.png file2.png file3.PNG file4.PNG
231+
232+
foo@bar:~$ ./main 'test_files_05/*.png'
233+
"test_files_05/file2.png"
234+
"test_files_05/file1.png"
235+
236+
foo@bar:~$ ./main 'test_files_05/*.PNG'
237+
"test_files_05/file3.PNG"
238+
"test_files_05/file4.PNG"
239+
```

0 commit comments

Comments
 (0)