• <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 閱讀(211) 評論(0)  編輯 收藏 引用 所屬分類: C字符串函數源碼分析

            久久一区二区三区免费| 国产精品成人99久久久久91gav| 久久久久国产一级毛片高清板| 国产精品嫩草影院久久| 久久久久这里只有精品 | 日本一区精品久久久久影院| 99久久亚洲综合精品网站| 久久久久国产精品嫩草影院 | 91久久精一区二区三区大全| 国产精品嫩草影院久久| 无码伊人66久久大杳蕉网站谷歌 | 久久久亚洲欧洲日产国码是AV| AV无码久久久久不卡蜜桃| 18岁日韩内射颜射午夜久久成人| 日日狠狠久久偷偷色综合免费| 久久久久亚洲av无码专区导航| 久久精品18| 99re久久精品国产首页2020| 午夜福利91久久福利| 久久久久久九九99精品| 亚洲伊人久久成综合人影院 | 久久久久久亚洲精品无码| 国产成年无码久久久免费| 精品国产91久久久久久久a| 久久综合久久自在自线精品自| 久久久久久亚洲精品无码| 四虎国产精品免费久久5151| 无码人妻久久久一区二区三区| 日本国产精品久久| 国产精品九九久久免费视频 | 国产精品久久自在自线观看| 久久亚洲AV无码精品色午夜麻豆 | 国产毛片欧美毛片久久久| 青青草原综合久久大伊人导航| 色综合久久最新中文字幕| av无码久久久久不卡免费网站| 亚洲乱码精品久久久久..| 国产69精品久久久久APP下载| 一本色综合久久| 久久AV无码精品人妻糸列| 777午夜精品久久av蜜臀|