亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? nstring.h

?? 奇跡世界公用文件源代碼,研究網絡游戲的朋友可以研究下
?? H
?? 第 1 頁 / 共 3 頁
字號:
        else
        {
            // a match, advance to next character
            ++thisIndex;
        }
    }
    nString trimmedString(&(this->Get()[thisIndex]));
    return trimmedString;
}

//------------------------------------------------------------------------------
/**
    Returns a new string, which is this string, stripped on the right side 
    by all characters in the char set.
*/
inline
nString
nString::TrimRight(const char* charSet) const
{
    ASSERT(charSet);
    if (this->IsEmpty())
    {
        return *this;
    }

    int charSetLen = strlen(charSet);
    int thisIndex = this->strLen - 1;
    bool stopped = false;
    while (!stopped && (thisIndex < this->strLen))
    {
        int charSetIndex;
        bool match = false;
        for (charSetIndex = 0; charSetIndex < charSetLen; charSetIndex++)
        {
            if ((*this)[thisIndex] == charSet[charSetIndex])
            {
                // a match
                match = true;
                break;
            }
        }
        if (!match)
        {
            // stop if no match
            stopped = true;
        }
        else
        {
            // a match, advance to next character
            --thisIndex;
        }
    }
    nString trimmedString;
    trimmedString.Set(this->Get(), thisIndex + 1);
    return trimmedString;
}

//------------------------------------------------------------------------------
/**
    Trim both sides of a string.
*/
inline
nString
nString::Trim(const char* charSet) const
{
    return this->TrimLeft(charSet).TrimRight(charSet);
}

//------------------------------------------------------------------------------
/**
    Substitute every occurance of origStr with substStr.
*/
inline
nString
nString::Substitute(const char* matchStr, const char* substStr) const
{
    ASSERT(matchStr && substStr);

    const char* ptr = this->Get();
    int matchStrLen = strlen(matchStr);
    nString dest;

    // walk original string for occurances of str
    const char* occur;
    while ((occur = strstr(ptr, matchStr)))
    {
        // append string fragment until match
        dest.AppendRange(ptr, occur - ptr);

        // append replacement string
        dest.Append(substStr);

        // adjust source pointer
        ptr = occur + matchStrLen;
    }
    dest.Append(ptr);
    return dest;
}

//------------------------------------------------------------------------------
/**
    Returns content as integer.
*/
inline
int
nString::AsInt() const
{
    const char* ptr = this->Get();
    return atoi(ptr);
}

//------------------------------------------------------------------------------
/**
    Returns content as float.
*/
inline
float
nString::AsFloat() const
{
    const char* ptr = this->Get();
    return float(atof(ptr));
}

//------------------------------------------------------------------------------
/**
    This converts an UTF-8 string to 8-bit-ANSI. Note that only characters
    in the range 0 .. 255 are converted, all other characters will be converted
    to a question mark.

    For conversion rules see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
*/
inline
void
nString::UTF8toANSI()
{
    uchar* src = (uchar*) this->Get();
    uchar* dst = src;
    uchar c;
    while ((c = *src++))
    {
        if (c >= 0x80)
        {
            if ((c & 0xE0) == 0xC0)
            {
                // a 2 byte sequence with 11 bits of information
                ushort wide = ((c & 0x1F) << 6) | (*src++ & 0x3F);
                if (wide > 0xff)
                {
                    c = '?';
                }
                else
                {
                    c = (uchar) wide;
                }
            }
            else if ((c & 0xF0) == 0xE0)
            {
                // a 3 byte sequence with 16 bits of information
                c = '?';
                src += 2;
            }
            else if ((c & 0xF8) == 0xF0)
            {
                // a 4 byte sequence with 21 bits of information
                c = '?';
                src += 3;
            }
            else if ((c & 0xFC) == 0xF8)
            {
                // a 5 byte sequence with 26 bits of information
                c = '?';
                src += 4;
            }
            else if ((c & 0xFE) == 0xFC)
            {
                // a 6 byte sequence with 31 bits of information
                c = '?';
                src += 5;
            }
        }
        *dst++ = c;
    }
    *dst = 0;
}
//------------------------------------------------------------------------------
/**
    Convert contained ANSI string to UTF-8 in place.
*/
inline
void
nString::ANSItoUTF8()
{
    ASSERT(!this->IsEmpty());
    int bufSize = this->Length() * 2 + 1;
    char* buffer = new char[bufSize];
    char* dstPtr = buffer;
    const char* srcPtr = this->Get();
    unsigned char c;
    while ((c = *srcPtr++))
    {
        // note: this only covers the 2 cases that the character
        // is between 0 and 127 and between 128 and 255
        if (c < 128)
        {
            *dstPtr++ = c;
        }
        else
        {
            *dstPtr++ = 192 + (c / 64);
            *dstPtr++ = 128 + (c % 64);
        }
    }
    *dstPtr = 0;
    this->Set(buffer);
    delete[] buffer;
}

//------------------------------------------------------------------------------
/**
    Converts backslashes to slashes.
*/
inline
void
nString::ConvertBackslashes()
{
    char* ptr = (char*) this->Get();
    int i;
    for (i = 0; i <= this->strLen; i++)
    {
        if (ptr[i] == '\\')
        {
            ptr[i] = '/';
        }
    }
}

//------------------------------------------------------------------------------
/**
    @return     pointer to extension (without the dot), or 0
*/
inline
const char*
nString::GetExtension() const
{
    const char* str = this->Get();
    const char* ext = strrchr(str, '.');
    if (ext)
    {
        ext++;
        if (ext[0] != 0)
        {
            return ext;
        }
    }
    return 0;
}

//------------------------------------------------------------------------------
/**
    Returns true if file extension matches.

    @param  ext     extension string (without the dot)
    @return         true if extension matches
*/
inline
bool
nString::CheckExtension(const char* ext) const
{
    ASSERT(ext);
    const char* extStr = this->GetExtension();
	if (0 == extStr)
    {
		return false;
    }
    return (0 == (strcmp(ext, extStr)));
}

//------------------------------------------------------------------------------
/**
    Remove the file extension.
*/
inline
void
nString::StripExtension()
{
    char* ext = (char*) this->GetExtension();
    if (ext)
    {
        ext[-1] = 0;
    }
}

//------------------------------------------------------------------------------
/**
    Get a pointer to the last directory separator.
*/
inline
char*
nString::GetLastSlash() const
{
    char* s = (char*) this->Get();
    char* lastSlash = strrchr(s, '/');
    if (0 == lastSlash) lastSlash = strrchr(s, '\\');
    if (0 == lastSlash) lastSlash = strrchr(s, ':');
    return lastSlash;
}

//------------------------------------------------------------------------------
/**
    Return a nString object containing the part after the last
    path separator.
*/
inline
nString
nString::ExtractFileName() const
{
    nString pathString;
    char* lastSlash = this->GetLastSlash();
    if (lastSlash)
    {
        pathString = &(lastSlash[1]);
    }
    else
    {
        pathString = this->Get();
    }
    return pathString;
}

//------------------------------------------------------------------------------
/**
    秦寸 鞏磊凱撈 箭磊肺  備己 登菌綽瘤 八葷 茄促-肯
*/
inline 
bool 
nString::IsNumberic()
{
    int len=this->Length();
    nString str=this->Get();

    for(int i=0;i<len;i++)
    {
        if(isdigit(str[i])==0)
        {
            return false;
        }
    }

    return true;
}
//------------------------------------------------------------------------------
/**
    Return a nString object containing the last directory of the path, i.e.
    a category.

    - 17-Feb-04     floh    fixed a bug when the path ended with a slash
*/
inline
nString
nString::ExtractLastDirName() const
{
    nString pathString(*this);
    char* lastSlash = pathString.GetLastSlash();
    
    // special case if path ends with a slash
    if (lastSlash)
    {
        if (0 == lastSlash[1])
        {
            *lastSlash = 0;
            lastSlash = pathString.GetLastSlash();
        }

        char* secLastSlash = 0;
        if (0 != lastSlash)
        {
            *lastSlash = 0; // cut filename
            secLastSlash = pathString.GetLastSlash();
            if (secLastSlash)
            {
                *secLastSlash = 0;
                return nString(secLastSlash+1);
            }
        }
    }
    return "";
}

//------------------------------------------------------------------------------
/**
    Return a nString object containing the part before the last
    directory separator.
    
    NOTE: I left my fix in that returns the last slash (or colon), this was 
    necessary to tell if a dirname is a normal directory or an assign.     

    - 17-Feb-04     floh    fixed a bug when the path ended with a slash
*/
inline
nString
nString::ExtractDirName() const
{
    nString pathString(*this);
    char* lastSlash = pathString.GetLastSlash();

    // special case if path ends with a slash
    if (lastSlash)
    {
        if (0 == lastSlash[1])
        {
            *lastSlash = 0;
            lastSlash = pathString.GetLastSlash();
        }
        if (lastSlash)
        {
            *++lastSlash = 0;
        }
    }
    return pathString;
}

//------------------------------------------------------------------------------
/**
    Return a path string object which contains of the complete path
    up to the last slash. Returns an empty string if there is no
    slash in the path.
*/
inline
nString
nString::ExtractToLastSlash() const
{
    nString pathString(*this);
    char* lastSlash = pathString.GetLastSlash();
    if (lastSlash)
    {
        lastSlash[1] = 0;
    }
    else
    {
        pathString = "";
    }
    return pathString;
}

//------------------------------------------------------------------------------
/**
*/
/*
inline
bool
nString::MatchPattern(const nString& pattern) const
{
    return n_strmatch(this->Get(), pattern.Get());
}
*/
//------------------------------------------------------------------------------
#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区精品久久911| 国产精品亚洲一区二区三区在线| 精品少妇一区二区三区 | 亚洲欧美国产高清| 亚洲成人激情综合网| 亚洲444eee在线观看| 蜜臀精品一区二区三区在线观看| 久久精品国产网站| 国产毛片精品国产一区二区三区| 成人听书哪个软件好| 欧美色综合久久| 久久久久久久久久久久久女国产乱| 一区二区国产盗摄色噜噜| 精品无人码麻豆乱码1区2区| 欧美福利视频导航| 亚洲观看高清完整版在线观看| 久久成人免费电影| 色综合一区二区| 亚洲精品一区二区在线观看| 精品久久久久久综合日本欧美| 中文字幕亚洲成人| 狠狠色综合色综合网络| 色哟哟国产精品| 亚洲国产精品成人久久综合一区| 亚洲国产日韩一区二区| 日本乱人伦一区| 1024精品合集| 成人免费视频网站在线观看| 91精彩视频在线| 国产色一区二区| 国内精品视频666| 2023国产精品| 国产91精品一区二区麻豆网站 | 日本最新不卡在线| 欧美色大人视频| 丝袜国产日韩另类美女| 久久久精品综合| 久久草av在线| 国产欧美中文在线| 99re在线精品| 亚洲超碰精品一区二区| 91精品福利在线一区二区三区| 久久99精品网久久| 国产色产综合产在线视频 | 久久久91精品国产一区二区精品| 精东粉嫩av免费一区二区三区| 精品国产伦一区二区三区观看体验| 国产成人8x视频一区二区| 中文字幕一区免费在线观看| 久久久亚洲精品石原莉奈| 99免费精品视频| 美女一区二区三区在线观看| 国产婷婷色一区二区三区四区 | 亚洲男同性恋视频| 日韩欧美综合在线| 色悠悠久久综合| 国产盗摄精品一区二区三区在线| 亚洲午夜久久久久| 国产精品丝袜黑色高跟| 欧美一区二区三区四区久久| 不卡高清视频专区| 韩国女主播成人在线观看| 亚洲视频中文字幕| 国产精品视频你懂的| 精品国产一区二区三区av性色| 91美女在线视频| 国产91清纯白嫩初高中在线观看 | 亚洲欧洲精品天堂一级| 亚洲免费观看高清| 久久综合99re88久久爱| 欧美日韩mp4| 欧美调教femdomvk| 91成人免费在线视频| 97久久精品人人澡人人爽| 成人高清视频在线观看| 国产成人免费视频一区| 国产成人精品免费| 国产99久久久久久免费看农村| 久久er99精品| 韩国一区二区视频| 国产精品1区二区.| 成人免费视频一区二区| thepron国产精品| 色综合久久99| 欧美午夜免费电影| 日韩一区二区三区在线观看| 欧美变态tickling挠脚心| 精品女同一区二区| 国产精品福利一区二区| 亚洲精品成a人| 日日夜夜免费精品| 国产精品自产自拍| 一本久道中文字幕精品亚洲嫩| 欧美区视频在线观看| 精品国产伦一区二区三区观看方式 | 亚洲国产精品ⅴa在线观看| 亚洲同性同志一二三专区| 美女一区二区三区在线观看| 91年精品国产| 久久综合九色综合97婷婷| 国产精品第五页| 狠狠色综合日日| 欧洲在线/亚洲| 国产三级一区二区| 男人操女人的视频在线观看欧美| av一区二区三区| 久久嫩草精品久久久精品| 亚洲123区在线观看| 成人深夜在线观看| 国产亚洲精品超碰| 日韩1区2区3区| 4438x亚洲最大成人网| 亚洲女同一区二区| k8久久久一区二区三区| 国产欧美日韩久久| 高清不卡一区二区在线| 亚洲精品一区二区精华| 日韩中文字幕麻豆| 欧美色图天堂网| 一区二区三区在线播放| 91在线视频观看| 一区二区三区欧美在线观看| 91免费国产在线| 自拍偷在线精品自拍偷无码专区| 国产一区二区女| 国产精品欧美久久久久一区二区| 国产传媒一区在线| 国产精品视频你懂的| 99这里都是精品| 亚洲精品大片www| 欧美乱妇20p| 国产一区激情在线| 亚洲视频在线一区二区| 欧美精品一二三四| 奇米一区二区三区av| 久久精品一级爱片| 91亚洲大成网污www| 亚洲国产视频在线| 欧美刺激午夜性久久久久久久| 狠狠色丁香九九婷婷综合五月| 亚洲sss视频在线视频| 精品久久五月天| 欧洲精品一区二区| 国产一区二区日韩精品| 亚洲丰满少妇videoshd| 久久久国产综合精品女国产盗摄| 日韩久久久久久| 欧美电影一区二区三区| 丁香婷婷综合网| 美女网站色91| 亚洲国产成人av| 亚洲精品一二三四区| 欧美国产一区二区在线观看 | 亚洲一区二区精品3399| 国产精品每日更新| 久久久精品蜜桃| 欧美欧美欧美欧美| 91免费精品国自产拍在线不卡| 国产福利91精品| 成人小视频在线| 国产一区二区主播在线| 精彩视频一区二区三区| 日韩电影网1区2区| 图片区小说区区亚洲影院| 一区二区三区在线视频免费| 国产精品电影院| 亚洲欧美日韩国产另类专区| 亚洲欧美激情视频在线观看一区二区三区 | 亚洲欧美日韩一区| 亚洲人成亚洲人成在线观看图片| 中文一区二区在线观看| 综合电影一区二区三区| 亚洲女性喷水在线观看一区| 亚洲一区二区三区四区中文字幕 | 欧美中文字幕一区二区三区| 欧美天堂一区二区三区| 日韩一区二区免费在线电影| 日韩一区二区在线播放| 久久先锋影音av鲁色资源网| 国产精品三级久久久久三级| 亚洲自拍偷拍综合| 人人狠狠综合久久亚洲| 国产福利91精品一区| 91福利视频久久久久| 3d动漫精品啪啪1区2区免费| 久久久久亚洲蜜桃| 一区二区三区在线免费| 国产毛片一区二区| 欧美中文字幕一二三区视频| 欧美videos中文字幕| 亚洲丝袜自拍清纯另类| 美腿丝袜一区二区三区| 欧美最新大片在线看| 欧美激情一区在线观看| 免费在线观看一区| 在线精品亚洲一区二区不卡| 2023国产精品视频| 美国一区二区三区在线播放| 色综合久久综合中文综合网| 久久网站热最新地址|