If I understand things correctly, “as string as lowercase” allows me to check a string regardless of case by converting it to lowercase before doing the comparison. Is this correct?
If so. here is my Issue:
Text file line I am looking for: “Foo_As_Bar = xxx” or Foo_as_Bar = xxx" (The “as” may be in either case in the file)
Text in file: "Foo_As_Bar"
Q: lines whose ( it as string as lowercase contains “Foo_As_Bar” ) of file "C:\temp\text.txt"
A: empty result
Text in file: "Foo_as_Bar"
Q: lines whose ( it as string as lowercase contains “Foo_as_Bar” ) of file "C:\temp\text.txt"
A: empty result
Text in file: "Foo_As_Bar"
Q: lines whose ( it as string contains “Foo_As_Bar” ) of file "C:\temp\text.txt"
A: “Foo_As_Bar = xxx”
Text in file: "Foo_as_Bar"
Q: lines whose ( it as string contains “Foo_as_Bar” ) of file "C:\temp\text.txt"
A: “Foo_as_Bar = xxx”
Just to expand on that, “as lowercase” is not some kind of special directive on the comparison; it’s just taking the string and changing it to a lowercase form. When we use this to perform case-insensitive comparisons, we have to convert both sides of the comparison operation (or enter our literal string in the correct lowercase).
Comparing two strings in mixed-case results in a False