Hi, anyone know how to do a case insensitive string compare or how touppercase or tolowercase functions?
I cannot find such things in MT4
thanks.
I cannot find such things in MT4
thanks.
required to function call function 2 replies
Sort String Array by String Length 2 replies
How to compare Symbol() string to find "EURUSD" in it? 2 replies
stop loss function and edit time function for Breakout EA 1 reply
String compare Upper/Lower 2 replies
Quoting ycompDislikedsince I couldn't find anything, decided to write it myself... if anyone knows if there are built in functions to use then please let me know... thanks.
or if there is a more efficient way to write it. There is a lot of string copying going on in the StringGetChar line I think.
// returns aString in UpperCase
string toUpperCase(string aString) {
int l = StringLen(aString);
string s = aString;
for (int i=0; i<L; i="">
s = StringSetChar(s, i, charToUpperCase(StringGetChar(aString, i)));
return (s);
}
// returns aChar as Uppercase
int charToUpperCase(int aChar) {
if ((aChar >= 'a') && (aChar <= 'z'))
return (aChar - 32);
else return (aChar);
}</L;>Ignored