Hi,
I think, it would be better:
bool StringIsDigit(string str) { bool result = true; int lenght = StringLen(str); if(lenght == 0) return(false); <-- if it is not here, than result is true. Because while-condition (up) will be false. for(int i=0; i < lenght; i++) { int symbol = StringGetChar(str, i); if(symbol < 48 || symbol > 57) { result = false; break; } } return(result); }
//+------------------------------------------------------------------+ //| StringUpperCase | //+------------------------------------------------------------------+ string StringUpperCase(string str) { string s = str; int lenght = StringLen(str) - 1, symbol; while(lenght >= 0) { symbol = StringGetChar(s, lenght); if((symbol > 96 && symbol < 123) || (symbol > 223 && symbol < 256)) s = StringSetChar(s, lenght, symbol - 32); // this part of codes gets error else if(symbol > -33 && symbol < 0) s = StringSetChar(s, lenght, symbol + 224); // this part of codes gets error lenght--; } return(s); }The value part of the StringSetChar gives a compilation error.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
New article Strings: Table of ASCII Symbols and Its Use has been published:
Author: Antoniuk Oleg