• <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 閱讀(1362) 評論(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
            亚洲午夜久久久久久久久久| 久久精品国产精品亚洲| 久久久中文字幕| 四虎久久影院| 国产精品毛片久久久久久久| 色婷婷噜噜久久国产精品12p| 亚洲精品乱码久久久久久久久久久久 | 久久亚洲欧洲国产综合| 久久天天躁狠狠躁夜夜avapp| 久久青青草原精品国产| 国产三级精品久久| 久久天堂AV综合合色蜜桃网 | 秋霞久久国产精品电影院| 亚洲精品美女久久久久99小说| 久久人爽人人爽人人片AV | 国产午夜福利精品久久| 久久人人爽人人人人爽AV| 日本免费久久久久久久网站| 人妻精品久久久久中文字幕69| 欧美亚洲另类久久综合婷婷| 99久久精品国产麻豆| 午夜人妻久久久久久久久| 四虎亚洲国产成人久久精品| 99热成人精品免费久久| 成人资源影音先锋久久资源网| 久久久亚洲欧洲日产国码是AV| 国产精品青草久久久久福利99| 久久国产精品成人影院| 97精品伊人久久久大香线蕉| 久久亚洲sm情趣捆绑调教| 亚洲国产成人久久笫一页| 国产精品激情综合久久| 18岁日韩内射颜射午夜久久成人| 无码久久精品国产亚洲Av影片| 亚洲综合熟女久久久30p| 欧美日韩精品久久久免费观看 | 72种姿势欧美久久久久大黄蕉 | 精品久久久久久久国产潘金莲 | 久久精品亚洲AV久久久无码| 久久久国产99久久国产一| 亚洲国产成人久久综合野外|