• <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>

            Life is Good.

            Enhance Tech and English
            隨筆 - 65, 文章 - 20, 評論 - 21, 引用 - 0
            數據加載中……

            4 - strcmp

            /***
            *strcmp - compare two strings, returning less than, equal to, or greater than
            *
            *Purpose:
            *       STRCMP compares two strings and returns an integer
            *       to indicate whether the first is less than the second, the two are
            *       equal, or whether the first is greater than the second.
            *
            *       Comparison is done byte by byte on an UNSIGNED basis, which is to
            *       say that Null (0) is less than any other character (1-255).
            *
            *Entry:
            *       const char * src - string for left-hand side of comparison
            *       const char * dst - string for right-hand side of comparison
            *
            *Exit:
            *       returns -1 if src <  dst
            *       returns  0 if src == dst
            *       returns +1 if src >  dst
            *
            *Exceptions:
            *
            ******************************************************************************
            */

            int __cdecl strcmp (
                    
            const char * src,
                    
            const char * dst
                    )
            {
                    
            int ret = 0 ;

                    
            while! (ret = *(unsigned char *)src - *(unsigned char *)dst) && *dst)
                            
            ++src, ++dst;

                    
            if ( ret < 0 )
                            ret 
            = -1 ;
                    
            else if ( ret > 0 )
                            ret 
            = 1 ;

                    
            return( ret );
            }

            int _tmain(int argc, _TCHAR* argv[])
            {
              
            char* p1 = "abcde";
              
            char* p2 = "abchd";

              
            int i = my_strcmp(p1, p2);

              
            return 0;
            }

            posted on 2011-06-02 21:49 Mike Song 閱讀(213) 評論(0)  編輯 收藏 引用 所屬分類: C字符串函數源碼分析

            精品久久久久久亚洲精品 | 亚洲精品无码久久久久sm| 久久青青色综合| 成人妇女免费播放久久久| 久久av高潮av无码av喷吹| 香蕉久久夜色精品国产2020| 国产精品9999久久久久| 亚洲欧洲精品成人久久奇米网| 久久精品亚洲中文字幕无码麻豆| 99久久精品毛片免费播放| 四虎影视久久久免费| 久久青青草原综合伊人| 波多野结衣久久| 91精品观看91久久久久久| 国产A三级久久精品| 久久久久亚洲AV无码专区桃色| 色诱久久久久综合网ywww| 久久精品国产精品亚洲下载| 久久91精品国产91久久户| 99久久夜色精品国产网站| 开心久久婷婷综合中文字幕| 麻豆精品久久久一区二区| 亚洲AV无码久久精品蜜桃| 亚洲精品NV久久久久久久久久 | 999久久久免费国产精品播放| 日日躁夜夜躁狠狠久久AV| 久久天天婷婷五月俺也去| 久久精品国产精品亚洲下载 | 亚洲国产欧洲综合997久久| 天天综合久久一二三区| 久久久久久久综合日本| 久久精品三级视频| 久久久久九国产精品| 久久精品中文字幕第23页| 99久久精品九九亚洲精品| 99久久99久久精品免费看蜜桃| 亚洲精品无码久久久久久| 亚洲精品无码久久千人斩| 蜜臀av性久久久久蜜臀aⅴ麻豆 | 久久93精品国产91久久综合| 久久精品男人影院|