• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            JonsenElizee

            Software Developing Blog

            "An idea is fragile . It can be killed by a scornful smile or a yawn .It can be mound down by irony and scared to death by a cold look."
            "Most cultures throughout human history have not liked creative individuals .They ignore them or kill them.It is a very efficient way of stopping creativity."

            ------Advertising boss Charles Browe and Howard Gardner ,professor at Harvard

               :: 首頁 :: 新隨筆 ::  ::  :: 管理 ::
            Here is a simple palindrome algorithm from me.
            It only can make a judge on single-byte character string.
            Can anybody write a palindrome algorithm for Chinese character string? thank you at first.


            posted on 2010-07-21 17:19 JonsenElizee 閱讀(1374) 評論(1)  編輯 收藏 引用 所屬分類: C++.BasicLinux.C++

            評論

            # re: My Palindrome Algorithm 2010-07-23 17:10 GRF

            bool IsPalindrome(const char str[])
            {
            if (!str)
            {
            return true;
            }

            int len = strlen(str);
            int i,j;
            for (i=0,j=len-1;i<j;i++,j--)
            {
            if (str[i]<0) //中文字符
            {
            if ((str[i]!=str[j-1])||(str[i+1]!=str[j]))
            {
            break;
            }
            i+=2;
            j-=2;
            }
            else //英文字符
            {
            if (str[i]!=str[j])
            {
            break;
            }
            i++;
            j--;
            }
            }
            return i>=j;
            }  回復  更多評論
              

            By JonsenElizee
            亚洲国产高清精品线久久| 97久久香蕉国产线看观看| 亚洲精品无码久久久| 久久久无码精品亚洲日韩京东传媒| 亚洲精品乱码久久久久久久久久久久 | 久久人搡人人玩人妻精品首页 | 色综合合久久天天综合绕视看| 狠狠精品干练久久久无码中文字幕| 精品一二三区久久aaa片| 伊人久久大香线蕉精品| 色偷偷88888欧美精品久久久| 一本伊大人香蕉久久网手机| 久久精品免费一区二区| 国内精品久久久久久麻豆| 成人综合伊人五月婷久久| 久久丫忘忧草产品| 天堂无码久久综合东京热| 久久综合久久综合久久| 久久精品国产亚洲av麻豆色欲| 亚洲国产一成久久精品国产成人综合 | 色综合合久久天天给综看| 精品久久久久久国产91| 久久精品国产亚洲精品2020| A级毛片无码久久精品免费| 一本久久综合亚洲鲁鲁五月天| 亚洲天堂久久精品| 久久综合久久久| 色综合合久久天天综合绕视看 | 亚洲日本久久久午夜精品| 久久久久无码国产精品不卡| 久久久久久极精品久久久| 麻豆精品久久久一区二区| 青青青国产精品国产精品久久久久 | 香蕉久久一区二区不卡无毒影院| 久久精品国产亚洲AV无码偷窥| 久久婷婷五月综合97色一本一本| 伊人色综合久久天天人手人婷| 午夜精品久久久久久99热| 久久久无码精品亚洲日韩按摩 | 97久久国产露脸精品国产| 亚洲狠狠婷婷综合久久久久|