首字母大写并转换成container

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;
    }
    ;
    strFirstUpr("HELLO,");
    pause;
}

posted @ 2011-11-17 16:19  perock  阅读(266)  评论(0编辑  收藏  举报