I need to know if a string is at least one character or more. I need to find the uppercase
character .
I used this code:
str testStr;
int flag;
testStr = "abdE2" ;
flag = strScan(testStr , "ABCDEFGHILMNOPQRSTUVZ" ,flag ,strLen(testStr));
info(strFmt("%1",flag) );
But not work!
A problem is that the function strScan does not distinguish uppercase and lowercase.
There is a solution?
Thanks,
Enjoy!
The code below tests if a string is one character or more and afterwards finds all the uppercase characters. Numbers are ignored since they cannot be uppercase.
This is the output:
EDIT: Like Jan B. Kjeldsen pointed out, use
char2num(testStr, i) != char2num(strLwr(testStr), i)
and notchar2num(testStr, i) == char2num(strUpr(testStr), i)
to make sure it evaluates symbols and numbers correctly.