• <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
            午夜视频久久久久一区| 国产亚洲精久久久久久无码77777 国产亚洲精品久久久久秋霞 | 久久久久亚洲av无码专区喷水| 热99RE久久精品这里都是精品免费 | 2021国产精品午夜久久| 伊人久久综合精品无码AV专区| 日产精品99久久久久久| 久久九九全国免费| 色综合久久天天综线观看| 精品国产乱码久久久久久1区2区| 97精品伊人久久久大香线蕉| 国产成年无码久久久免费| 久久亚洲欧美日本精品| A级毛片无码久久精品免费| 高清免费久久午夜精品| 国产欧美久久久精品影院| 久久精品国产久精国产| 思思久久99热只有频精品66| 99久久99这里只有免费费精品 | 狠狠人妻久久久久久综合蜜桃| 精品久久久久久国产| 欧美粉嫩小泬久久久久久久 | 久久久久亚洲AV无码永不| 久久精品国产国产精品四凭| 精品久久久久中文字幕日本| 久久99精品国产麻豆宅宅| 久久精品国产99久久香蕉| 精品综合久久久久久888蜜芽| 久久99久久99精品免视看动漫| 欧美性大战久久久久久 | 无码国内精品久久综合88| 亚洲综合久久综合激情久久| AV无码久久久久不卡蜜桃| 久久精品99久久香蕉国产色戒| 亚洲精品第一综合99久久| 欧美久久久久久午夜精品| 国产精品免费久久久久久久久| 99久久精品影院老鸭窝| 97久久久久人妻精品专区| 久久久精品2019免费观看| 国产成人精品久久|