⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cutils.c

📁 彩信MMS的全部代码
💻 C
字号:
/*
 * Copyright (C) Obigo AB, 2002-2005.
 * All rights reserved.
 *
 * This software is covered by the license agreement between
 * the end user and Obigo AB, and may be 
 * used and copied only in accordance with the terms of the 
 * said agreement.
 *
 * Obigo AB assumes no responsibility or 
 * liability for any errors or inaccuracies in this software, 
 * or any consequential, incidental or indirect damage arising
 * out of the use of the software.
 *
 */

















#include "cansilib.h"   
#include "chartype.h"   
#include "cutils.h"     
#include "chartype.h"   




























int cmnStrcmpNc(const char *str1, const char *str2)
{
    
    while (*str1 && *str2 && CMN_TOLOWER(*str1) == CMN_TOLOWER(*str2))
    {
        ++str1;
        ++str2;
    } 

    
    return *str1 == *str2 ? 0 : (*str1 < *str2 ? -1 : 1);
} 












unsigned long cmnStrnlen(const char *str, unsigned long length)
{
    unsigned long i = 0;

    for ( i = 0; i < length && *str++; ++i)
    {
        
    } 

    return i;
} 







int cmnIsDigits (const char* str)
{
    unsigned len;
    unsigned i;
    
    if (!str)
    {
        return 0;
    }
    
    len = strlen(str);
    for (i = 0; i < len; i++)
    {
        if (!CMN_ISDIGIT(str[i]))
        {
            return 0;
        }
    }
    
    return 1;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -