Given this directory tree:
src/MyLibrary/MyHeader.h
src/file.cpp
file.cpp:
#include "mylibrary/myheader.h"
...
Compiling file.cpp works with VS, fails in gcc.
Thanks.
Both String#includes() and String#indexOf() are case sensitive. Neither function supports regular expressions. To do case insensitive search, you can use regular expressions and the String#match() function, or you can convert both the string and substring to lower case using the String#toLowerCase() function.
Yes. Windows (local) file systems, including NTFS, as well as FAT and variants, are case insensitive (normally).
C++ is very case sensitive. A #include and #Include Are not the same thing. In fact, #Include does not exist at all. So whether you are creating your own function or using one from a library, check for case sensitivity.
File names: Traditionally, Unix-like operating systems treat file names case-sensitively while Microsoft Windows is case-insensitive but, for most file systems, case-preserving.
The case sensitivity depends on the Operating System. Windows is not case sensitive. Linux is.
EDIT:
Actually, as observed by Martin York's comment, the case sensitivity depends on the file system. By default Windows uses a case insensitive file system, while Linux uses a case sensitive one. For whoever is interested to know which file systems are case sensitive and which aren't, there is a comprehensive list on Wikipedia: Comparison of file name limitations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With