• <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 閱讀(1373) 評論(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;
            }  回復(fù)  更多評論
              

            By JonsenElizee
            久久精品人人槡人妻人人玩AV | 久久久久一区二区三区| 国产国产成人精品久久| 伊人久久五月天| 99久久精品无码一区二区毛片 | 久久久久人妻一区精品| 香蕉久久影院| 97久久精品人妻人人搡人人玩| 久久成人影院精品777| 一本久久综合亚洲鲁鲁五月天| 久久久婷婷五月亚洲97号色| 精品久久久久久久中文字幕 | 久久久九九有精品国产| 久久人妻少妇嫩草AV无码蜜桃| 久久综合狠狠综合久久综合88| 久久综合九色欧美综合狠狠| 99精品久久精品一区二区| 久久只这里是精品66| 狠狠人妻久久久久久综合| 999久久久免费精品国产| 国产成人精品综合久久久久| 久久久久女教师免费一区| 久久免费视频网站| 精品综合久久久久久888蜜芽| 亚洲人成电影网站久久| 久久精品国产亚洲一区二区三区| 久久国产免费观看精品| 久久久久人妻一区二区三区vr | 国产精品久久国产精麻豆99网站| 久久久久久精品免费看SSS| 无码任你躁久久久久久老妇| 久久久久亚洲av毛片大| 国产精品成人无码久久久久久| 日韩亚洲欧美久久久www综合网| 国产美女久久精品香蕉69| 久久精品无码一区二区无码| 久久夜色精品国产欧美乱| 大伊人青草狠狠久久| 久久这里只有精品首页| 伊人色综合久久天天| 久久亚洲国产精品五月天婷|