static void strFirstUpr(Args _args)
{
container strFirstUpr(str _str)
{
container conRet;
int i;
str strTmp;
;
conRet = NJ_MF_str2con(_str," ");
for(i=1;i<=conlen(conRet);i++)
{
strTmp = conpeek(conRet,i);
strTmp = strlwr(strTmp);
strTmp = strupr(SubStr(strTmp,1,1))+Substr(strTmp,2,StrLen(strTmp));
conret = conpoke(conRet,i,strTmp);
print conpeek(conret,i);
}
return conRet;
}
str strFirstUpr2(str _str)
{
str tmp,retStr;
int i;
boolean firstStr;
;
firstStr = true;
tmp = strLwr(_str);
for (i=1; i<=strlen(tmp); i++)
{
if(firstStr)
{
retStr += strUpr(substr(tmp,i,1));
}
else
{
retStr += substr(tmp,i,1);
}
if(substr(tmp,i,1) == " ")
firstStr = true;
else
firstStr = false;
}
return retStr;
}
;
print strFirstUpr2("HELLO yOu yes hAO AN NOT,");
pause;
}