• <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 閱讀(1359) 評論(1)  編輯 收藏 引用 所屬分類: C++.Basic 、Linux.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
            久久午夜无码鲁丝片| 久久91亚洲人成电影网站| 伊人久久大香线蕉综合网站| 久久香综合精品久久伊人| 久久精品无码专区免费青青 | 66精品综合久久久久久久| 久久e热在这里只有国产中文精品99 | 欧美午夜A∨大片久久| 奇米影视7777久久精品人人爽| 三上悠亚久久精品| 久久精品国产色蜜蜜麻豆| 国产亚洲精久久久久久无码77777| 91精品国产乱码久久久久久| 久久久久国产一级毛片高清板| 国产精品一区二区久久精品涩爱| 999久久久免费精品国产| 久久午夜免费视频| 亚洲国产精品热久久| 亚洲AV无一区二区三区久久| AA级片免费看视频久久| 少妇精品久久久一区二区三区| 久久国产影院| 好属妞这里只有精品久久| 亚洲AV成人无码久久精品老人| 国产呻吟久久久久久久92| 久久婷婷成人综合色综合| 精品国产日韩久久亚洲| 婷婷久久综合九色综合绿巨人| 91精品国产高清久久久久久国产嫩草| 久久人人爽人人爽人人片AV东京热| 大蕉久久伊人中文字幕| 久久99国产精品久久久| 99久久久国产精品免费无卡顿 | 久久精品国产亚洲综合色| 久久人人爽人人爽人人片AV不| 亚洲国产精品无码久久九九| 久久综合成人网| 色欲综合久久躁天天躁| 亚洲精品WWW久久久久久| 亚洲伊人久久综合影院| 深夜久久AAAAA级毛片免费看|