青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

Cpper
C/C++高級工程師 Android高級軟件工程師 IT集成工程師 音頻工程師 熟悉c,c++,java,c#,py,js,asp等多種語言 程序猿
最近想做個基于Opengl的GUI
試了下SFML發現其String類對寬字節轉換有問題,
就修改了下String并重命名為Utf8
使用這個應該可以正確顯示中文
該類修改如下:
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented;
//    you must not claim that you wrote the original software.
//    If you use this software in a product, an acknowledgment
//    in the product documentation would be appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such,
//    and must not be misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source distribution.
//
////////////////////////////////////////////////////////////

#ifndef SFML_UTF8_HPP
#define SFML_UTF8_HPP

////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <string>

namespace sf
{
////////////////////////////////////////////////////////////
/// \brief Utility string class that automatically handles
///        conversions between types and encodings
///
////////////////////////////////////////////////////////////
class Utf8
{
public:

    
////////////////////////////////////////////////////////////
    // Types
    ////////////////////////////////////////////////////////////
    typedef std::basic_string<uint32_t>::iterator       Iterator;      ///< Iterator type
    typedef std::basic_string<uint32_t>::const_iterator ConstIterator; ///< Read-only iterator type

    
////////////////////////////////////////////////////////////
    // Static member data
    ////////////////////////////////////////////////////////////
    static const std::size_t InvalidPos; ///< Represents an invalid position in the string

    
////////////////////////////////////////////////////////////
    
/// \brief Default constructor
    
///
    
/// This constructor creates an empty string.
    
///
    
////////////////////////////////////////////////////////////
    Utf8();

    
////////////////////////////////////////////////////////////
    
/// \brief Construct from a single ANSI character and a locale
    
///
    
/// The source character is converted to UTF-32 according
    
/// to the given locale.
    
///
    
/// \param ansiChar ANSI character to convert
    
/// \param locale   Locale to use for conversion
    
///
    
////////////////////////////////////////////////////////////
    Utf8(char ansiChar);

    
////////////////////////////////////////////////////////////
    
/// \brief Construct from single UTF-32 character
    
///
    
/// \param utf32Char UTF-32 character to convert
    
///
    
////////////////////////////////////////////////////////////
    Utf8(uint32_t utf32Char);

    
////////////////////////////////////////////////////////////
    
/// \brief Construct from a null-terminated C-style ANSI string and a locale
    
///
    
/// The source string is converted to UTF-32 according
    
/// to the given locale.
    
///
    
/// \param ansiString ANSI string to convert
    
/// \param locale     Locale to use for conversion
    
///
    
////////////////////////////////////////////////////////////
    Utf8(const char* ansiString);

    
////////////////////////////////////////////////////////////
    
/// \brief Construct from an ANSI string and a locale
    
///
    
/// The source string is converted to UTF-32 according
    
/// to the given locale.
    
///
    
/// \param ansiString ANSI string to convert
    
/// \param locale     Locale to use for conversion
    
///
    
////////////////////////////////////////////////////////////
    Utf8(const std::string& ansiString);

    
////////////////////////////////////////////////////////////
    
/// \brief Construct from a null-terminated C-style UTF-32 string
    
///
    
/// \param utf32String UTF-32 string to assign
    
///
    
////////////////////////////////////////////////////////////
    Utf8(const uint32_t* utf32String);

    
////////////////////////////////////////////////////////////
    
/// \brief Construct from an UTF-32 string
    
///
    
/// \param utf32String UTF-32 string to assign
    
///
    
////////////////////////////////////////////////////////////
    Utf8(const std::basic_string<uint32_t>& utf32String);

    
////////////////////////////////////////////////////////////
    
/// \brief Copy constructor
    
///
    
/// \param copy Instance to copy
    
///
    
////////////////////////////////////////////////////////////
    Utf8(const Utf8& copy);

    
////////////////////////////////////////////////////////////
    
/// \brief Implicit conversion operator to std::string (ANSI string)
    
///
    
/// The current global locale is used for conversion. If you
    
/// want to explicitly specify a locale, see toAnsiString.
    
/// Characters that do not fit in the target encoding are
    
/// discarded from the returned string.
    
/// This operator is defined for convenience, and is equivalent
    
/// to calling toAnsiString().
    
///
    
/// \return Converted ANSI string
    
///
    
/// \see toAnsiString, operator std::wstring
    
///
    
////////////////////////////////////////////////////////////
    operator std::string() const;

    
////////////////////////////////////////////////////////////
    
/// \brief Convert the Unicode string to an ANSI string
    
///
    
/// The UTF-32 string is converted to an ANSI string in
    
/// the encoding defined by \a locale.
    
/// Characters that do not fit in the target encoding are
    
/// discarded from the returned string.
    
///
    
/// \param locale Locale to use for conversion
    
///
    
/// \return Converted ANSI string
    
///
    
/// \see toWideString, operator std::string
    
///
    
////////////////////////////////////////////////////////////
    std::string toAnsiString() const;

    
////////////////////////////////////////////////////////////
    
/// \brief Convert the Unicode string to a UTF-32 string
    
///
    
/// This function doesn't perform any conversion, since the
    
/// string is already stored as UTF-32 internally.
    
///
    
/// \return Converted UTF-32 string
    
///
    
/// \see toUtf8, toUtf16
    
///
    
////////////////////////////////////////////////////////////
    std::basic_string<uint32_t> toUtf32() const;

    
////////////////////////////////////////////////////////////
    
/// \brief Overload of assignment operator
    
///
    
/// \param right Instance to assign
    
///
    
/// \return Reference to self
    
///
    
////////////////////////////////////////////////////////////
    Utf8& operator =(const Utf8& right);

    
////////////////////////////////////////////////////////////
    
/// \brief Overload of += operator to append an UTF-32 string
    
///
    
/// \param right String to append
    
///
    
/// \return Reference to self
    
///
    
////////////////////////////////////////////////////////////
    Utf8& operator +=(const Utf8& right);

    
////////////////////////////////////////////////////////////
    
/// \brief Overload of [] operator to access a character by its position
    
///
    
/// This function provides read-only access to characters.
    
/// Note: the behavior is undefined if \a index is out of range.
    
///
    
/// \param index Index of the character to get
    
///
    
/// \return Character at position \a index
    
///
    
////////////////////////////////////////////////////////////
    uint32_t operator [](std::size_t index) const;

    
////////////////////////////////////////////////////////////
    
/// \brief Overload of [] operator to access a character by its position
    
///
    
/// This function provides read and write access to characters.
    
/// Note: the behavior is undefined if \a index is out of range.
    
///
    
/// \param index Index of the character to get
    
///
    
/// \return Reference to the character at position \a index
    
///
    
////////////////////////////////////////////////////////////
    uint32_t& operator [](std::size_t index);

    
////////////////////////////////////////////////////////////
    
/// \brief Clear the string
    
///
    
/// This function removes all the characters from the string.
    
///
    
/// \see isEmpty, erase
    
///
    
////////////////////////////////////////////////////////////
    void clear();

    
////////////////////////////////////////////////////////////
    
/// \brief Get the size of the string
    
///
    
/// \return Number of characters in the string
    
///
    
/// \see isEmpty
    
///
    
////////////////////////////////////////////////////////////
    std::size_t getSize() const;

    
////////////////////////////////////////////////////////////
    
/// \brief Check whether the string is empty or not
    
///
    
/// \return True if the string is empty (i.e. contains no character)
    
///
    
/// \see clear, getSize
    
///
    
////////////////////////////////////////////////////////////
    bool isEmpty() const;

    
////////////////////////////////////////////////////////////
    
/// \brief Erase one or more characters from the string
    
///
    
/// This function removes a sequence of \a count characters
    
/// starting from \a position.
    
///
    
/// \param position Position of the first character to erase
    
/// \param count    Number of characters to erase
    
///
    
////////////////////////////////////////////////////////////
    void erase(std::size_t position, std::size_t count = 1);

    
////////////////////////////////////////////////////////////
    
/// \brief Insert one or more characters into the string
    
///
    
/// This function inserts the characters of \a str
    
/// into the string, starting from \a position.
    
///
    
/// \param position Position of insertion
    
/// \param str      Characters to insert
    
///
    
////////////////////////////////////////////////////////////
    void insert(std::size_t position, const Utf8& str);

    
////////////////////////////////////////////////////////////
    
/// \brief Find a sequence of one or more characters in the string
    
///
    
/// This function searches for the characters of \a str
    
/// in the string, starting from \a start.
    
///
    
/// \param str   Characters to find
    
/// \param start Where to begin searching
    
///
    
/// \return Position of \a str in the string, or String::InvalidPos if not found
    
///
    
////////////////////////////////////////////////////////////
    std::size_t find(const Utf8& str, std::size_t start = 0const;

    
////////////////////////////////////////////////////////////
    
/// \brief Replace a substring with another string
    
///
    
/// This function replaces the substring that starts at index \a position
    
/// and spans \a length characters with the string \a replaceWith.
    
///
    
/// \param position    Index of the first character to be replaced
    
/// \param length      Number of characters to replace. You can pass InvalidPos to
    
///                    replace all characters until the end of the string.
    
/// \param replaceWith String that replaces the given substring.
    
///
    
////////////////////////////////////////////////////////////
    void replace(std::size_t position, std::size_t length, const Utf8& replaceWith);

    
////////////////////////////////////////////////////////////
    
/// \brief Replace all occurrences of a substring with a replacement string
    
///
    
/// This function replaces all occurrences of \a searchFor in this string
    
/// with the string \a replaceWith.
    
///
    
/// \param searchFor   The value being searched for
    
/// \param replaceWith The value that replaces found \a searchFor values
    
///
    
////////////////////////////////////////////////////////////
    void replace(const Utf8& searchFor, const Utf8& replaceWith);

    
////////////////////////////////////////////////////////////
    
/// \brief Return a part of the string
    
///
    
/// This function returns the substring that starts at index \a position
    
/// and spans \a length characters.
    
///
    
/// \param position Index of the first character
    
/// \param length   Number of characters to include in the substring (if
    
///                 the string is shorter, as many characters as possible
    
///                 are included). \ref InvalidPos can be used to include all
    
///                 characters until the end of the string.
    
///
    
/// \return String object containing a substring of this object
    
///
    
////////////////////////////////////////////////////////////
    Utf8 substring(std::size_t position, std::size_t length = InvalidPos) const;

    
////////////////////////////////////////////////////////////
    
/// \brief Get a pointer to the C-style array of characters
    
///
    
/// This functions provides a read-only access to a
    
/// null-terminated C-style representation of the string.
    
/// The returned pointer is temporary and is meant only for
    
/// immediate use, thus it is not recommended to store it.
    
///
    
/// \return Read-only pointer to the array of characters
    
///
    
////////////////////////////////////////////////////////////
    const uint32_t* getData() const;

    
////////////////////////////////////////////////////////////
    
/// \brief Return an iterator to the beginning of the string
    
///
    
/// \return Read-write iterator to the beginning of the string characters
    
///
    
/// \see end
    
///
    
////////////////////////////////////////////////////////////
    Iterator begin();

    
////////////////////////////////////////////////////////////
    
/// \brief Return an iterator to the beginning of the string
    
///
    
/// \return Read-only iterator to the beginning of the string characters
    
///
    
/// \see end
    
///
    
////////////////////////////////////////////////////////////
    ConstIterator begin() const;

    
////////////////////////////////////////////////////////////
    
/// \brief Return an iterator to the end of the string
    
///
    
/// The end iterator refers to 1 position past the last character;
    
/// thus it represents an invalid character and should never be
    
/// accessed.
    
///
    
/// \return Read-write iterator to the end of the string characters
    
///
    
/// \see begin
    
///
    
////////////////////////////////////////////////////////////
    Iterator end();

    
////////////////////////////////////////////////////////////
    
/// \brief Return an iterator to the end of the string
    
///
    
/// The end iterator refers to 1 position past the last character;
    
/// thus it represents an invalid character and should never be
    
/// accessed.
    
///
    
/// \return Read-only iterator to the end of the string characters
    
///
    
/// \see begin
    
///
    
////////////////////////////////////////////////////////////
    ConstIterator end() const;

private:

    friend 
bool operator ==(const Utf8& left, const Utf8& right);
    friend 
bool operator <(const Utf8& left, const Utf8& right);

    
////////////////////////////////////////////////////////////
    // Member data
    ////////////////////////////////////////////////////////////
    std::basic_string<uint32_t> m_string; ///< Internal string of UTF-32 characters
};

////////////////////////////////////////////////////////////
/// \relates String
/// \brief Overload of == operator to compare two UTF-32 strings
///
/// \param left  Left operand (a string)
/// \param right Right operand (a string)
///
/// \return True if both strings are equal
///
////////////////////////////////////////////////////////////
bool operator ==(const Utf8& left, const Utf8& right);

////////////////////////////////////////////////////////////
/// \relates String
/// \brief Overload of != operator to compare two UTF-32 strings
///
/// \param left  Left operand (a string)
/// \param right Right operand (a string)
///
/// \return True if both strings are different
///
////////////////////////////////////////////////////////////
bool operator !=(const Utf8& left, const Utf8& right);

////////////////////////////////////////////////////////////
/// \relates String
/// \brief Overload of < operator to compare two UTF-32 strings
///
/// \param left  Left operand (a string)
/// \param right Right operand (a string)
///
/// \return True if \a left is lexicographically before \a right
///
////////////////////////////////////////////////////////////
bool operator <(const Utf8& left, const Utf8& right);

////////////////////////////////////////////////////////////
/// \relates String
/// \brief Overload of > operator to compare two UTF-32 strings
///
/// \param left  Left operand (a string)
/// \param right Right operand (a string)
///
/// \return True if \a left is lexicographically after \a right
///
////////////////////////////////////////////////////////////
bool operator >(const Utf8& left, const Utf8& right);

////////////////////////////////////////////////////////////
/// \relates String
/// \brief Overload of <= operator to compare two UTF-32 strings
///
/// \param left  Left operand (a string)
/// \param right Right operand (a string)
///
/// \return True if \a left is lexicographically before or equivalent to \a right
///
////////////////////////////////////////////////////////////
bool operator <=(const Utf8& left, const Utf8& right);

////////////////////////////////////////////////////////////
/// \relates String
/// \brief Overload of >= operator to compare two UTF-32 strings
///
/// \param left  Left operand (a string)
/// \param right Right operand (a string)
///
/// \return True if \a left is lexicographically after or equivalent to \a right
///
////////////////////////////////////////////////////////////
bool operator >=(const Utf8& left, const Utf8& right);

////////////////////////////////////////////////////////////
/// \relates String
/// \brief Overload of binary + operator to concatenate two strings
///
/// \param left  Left operand (a string)
/// \param right Right operand (a string)
///
/// \return Concatenated string
///
////////////////////////////////////////////////////////////
Utf8 operator +(const Utf8& left, const Utf8& right);

#include 
"Utf8.inl"

// namespace sf


#endif // SFML_STRING_HPP


////////////////////////////////////////////////////////////
/// \class sf::String
/// \ingroup system
///
/// sf::String is a utility string class defined mainly for
/// convenience. It is a Unicode string (implemented using
/// UTF-32), thus it can store any character in the world
/// (European, Chinese, Arabic, Hebrew, etc.).
///
/// It automatically handles conversions from/to ANSI and
/// wide strings, so that you can work with standard string
/// classes and still be compatible with functions taking a
/// sf::String.
///
/// \code
/// sf::String s;
///
/// std::string s1 = s;  // automatically converted to ANSI string
/// std::wstring s2 = s; // automatically converted to wide string
/// s = "hello";         // automatically converted from ANSI string
/// s = L"hello";        // automatically converted from wide string
/// s += 'a';            // automatically converted from ANSI string
/// s += L'a';           // automatically converted from wide string
/// \endcode
///
/// Conversions involving ANSI strings use the default user locale. However
/// it is possible to use a custom locale if necessary:
/// \code
/// std::locale locale;
/// sf::String s;
/// 
/// std::string s1 = s.toAnsiString(locale);
/// s = sf::String("hello", locale);
/// \endcode
///
/// sf::String defines the most important functions of the
/// standard std::string class: removing, random access, iterating,
/// appending, comparing, etc. However it is a simple class
/// provided for convenience, and you may have to consider using
/// a more optimized class if your program requires complex string
/// handling. The automatic conversion functions will then take
/// care of converting your string to sf::String whenever SFML
/// requires it.
///
/// Please note that SFML also defines a low-level, generic
/// interface for Unicode handling, see the sf::Utf classes.
///
////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented;
//    you must not claim that you wrote the original software.
//    If you use this software in a product, an acknowledgment
//    in the product documentation would be appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such,
//    and must not be misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source distribution.
//
////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include "Utf8.h"
#include 
<iterator>
#include 
<cstring>
#include 
<iostream>


//定義查找表,長度256,表中的數值表示以此為起始字節的utf8字符長度
unsigned char utf8_look_for_table[] =
{
1111111111111111,
1111111111111111,
1111111111111111,
1111111111111111,
1111111111111111,
1111111111111111,
1111111111111111,
1111111111111111,
1111111111111111,
1111111111111111,
1111111111111111,
1111111111111111,
2222222222222222,
2222222222222222,
3333333333333333,
4444444455556611};

#define UTFLEN(x)  utf8_look_for_table[(x)]

std::basic_string
<uint32_t> toUint32t(const std::string& string)
{
    std::basic_string
<uint32_t> buffer;
    int32_t count 
= 0;
    uint32_t data 
= 0;
    auto itr 
= string.begin();
    
while(itr != string.end())
    {
        
if(count == 0)
        {
            
if(data != 0)
            {
                
if(data > 255)
                    data 
--;
                buffer.push_back(data);
                data 
= 0;
            }

            count 
=  utf8_look_for_table[(unsigned char)*itr];
            
if(count == 1)
            {
                buffer.push_back(
*itr);
                count 
= 0;
                data 
= 0;
            }
            
else
            {
                data 
= *itr + 1;
                count 
--;
            }
        }
        
else
        {
            data 
= (data << 8+ (1 + *itr);
            count 
--;
        }
        itr 
++;
    }

    
if(data != 0)
    {
        
if(data > 255)
            data 
--;
        buffer.push_back(data);
    }
    
return buffer;
}

std::
string toStdString(const std::basic_string<uint32_t>& utf8)
{
    std::
string string;
    
char buf[6= {0};
    uint32_t length 
= 0;
    auto itr 
= utf8.begin();
    
while(itr != utf8.end())
    {
        uint32_t d 
= *itr;
        buf[
0=  *itr & 0xFF;
        buf[
1= (*itr & 0xFF00>> 8;
        buf[
2= (*itr & 0xFF0000>> 16;
        buf[
3= (*itr & 0xFF000000>> 24;
        buf[
4= (*itr & 0xFF00000000>> 32;
        buf[
5= (*itr & 0xFF0000000000>> 36;

        
for(int i=5;i>=0;i--)
            
if(buf[i] != 0 && (buf[i]) != -1)
                
string.push_back(buf[i]);

        itr 
++;
    }
    
return string;
}


namespace sf
{
////////////////////////////////////////////////////////////
const std::size_t Utf8::InvalidPos = std::basic_string<uint32_t>::npos;


////////////////////////////////////////////////////////////
Utf8::Utf8()
{
}

////////////////////////////////////////////////////////////
Utf8::Utf8(char ansiChar)
{
    m_string.push_back(ansiChar);
}

////////////////////////////////////////////////////////////
Utf8::Utf8(uint32_t utf32Char)
{
    m_string 
+= utf32Char;
}

////////////////////////////////////////////////////////////
Utf8::Utf8(const char* ansiString)
{
    
if(ansiString)
    {
        std::
string copy(ansiString);
        
if(!copy.empty())
            m_string 
= toUint32t(copy);
    }
}


////////////////////////////////////////////////////////////
Utf8::Utf8(const std::string& ansiString)
{
    m_string 
= toUint32t(ansiString);
}

////////////////////////////////////////////////////////////
Utf8::Utf8(const uint32_t* utf32String)
{
    
if(utf32String)
        m_string 
= utf32String;
}

////////////////////////////////////////////////////////////
Utf8::Utf8(const std::basic_string<uint32_t>& utf32String):
m_string(utf32String)
{
}

////////////////////////////////////////////////////////////
Utf8::Utf8(const Utf8& copy):
m_string(copy.m_string)
{
}

////////////////////////////////////////////////////////////
Utf8::operator std::string() const
{
    
return toAnsiString();
}

////////////////////////////////////////////////////////////
std::string Utf8::toAnsiString()const
{
    
// Prepare the output string
    return toStdString(m_string);
}

////////////////////////////////////////////////////////////
std::basic_string<uint32_t> Utf8::toUtf32()const
{
    
return m_string;
}

////////////////////////////////////////////////////////////
Utf8& Utf8::operator =(const Utf8& right)
{
    m_string 
= right.m_string;
    
return *this;
}


////////////////////////////////////////////////////////////
Utf8& Utf8::operator +=(const Utf8& right)
{
    m_string 
+= right.m_string;
    
return *this;
}

////////////////////////////////////////////////////////////
uint32_t Utf8::operator [](std::size_t index)const
{
    
return m_string[index];
}

////////////////////////////////////////////////////////////
uint32_t& Utf8::operator [](std::size_t index)
{
    
return m_string[index];
}

////////////////////////////////////////////////////////////
void Utf8::clear()
{
    m_string.clear();
}

////////////////////////////////////////////////////////////
std::size_t Utf8::getSize()const
{
    
return m_string.size();
}

////////////////////////////////////////////////////////////
bool Utf8::isEmpty() const
{
    
return m_string.empty();
}

////////////////////////////////////////////////////////////
void Utf8::erase(std::size_t position, std::size_t count)
{
    m_string.erase(position, count);
}

////////////////////////////////////////////////////////////
void Utf8::insert(std::size_t position, const Utf8& str)
{
    m_string.insert(position, str.m_string);
}

////////////////////////////////////////////////////////////
std::size_t Utf8::find(const Utf8& str, std::size_t start)const
{
    
return m_string.find(str.m_string, start);
}

////////////////////////////////////////////////////////////
void Utf8::replace(std::size_t position, std::size_t length, const Utf8& replaceWith)
{
    m_string.replace(position, length, replaceWith.m_string);
}

////////////////////////////////////////////////////////////
void Utf8::replace(const Utf8& searchFor, const Utf8& replaceWith)
{
    std::size_t step 
= replaceWith.getSize();
    std::size_t len 
= searchFor.getSize();
    std::size_t pos 
= find(searchFor);

    
// Replace each occurrence of search
    while (pos != InvalidPos)
    {
        replace(pos, len, replaceWith);
        pos 
= find(searchFor, pos + step);
    }
}

////////////////////////////////////////////////////////////
Utf8 Utf8::substring(std::size_t position,std::size_t length)const
{
    
return m_string.substr(position,length);
}

////////////////////////////////////////////////////////////
const uint32_t* Utf8::getData()const
{
    
return m_string.c_str();
}

////////////////////////////////////////////////////////////
Utf8::Iterator Utf8::begin()
{
    
return m_string.begin();
}

////////////////////////////////////////////////////////////
Utf8::ConstIterator Utf8::begin()const
{
    
return m_string.begin();
}

////////////////////////////////////////////////////////////
Utf8::Iterator Utf8::end()
{
    
return m_string.end();
}

////////////////////////////////////////////////////////////
Utf8::ConstIterator Utf8::end() const
{
    
return m_string.end();
}

////////////////////////////////////////////////////////////
bool operator ==(const Utf8& left, const Utf8& right)
{
    
return left.m_string == right.m_string;
}

////////////////////////////////////////////////////////////
bool operator !=(const Utf8& left, const Utf8& right)
{
    
return !(left == right);
}

////////////////////////////////////////////////////////////
bool operator <(const Utf8& left, const Utf8& right)
{
    
return left.m_string < right.m_string;
}

////////////////////////////////////////////////////////////
bool operator >(const Utf8& left,const Utf8& right)
{
    
return right < left;
}

////////////////////////////////////////////////////////////
bool operator <=(const Utf8& left, const Utf8& right)
{
    
return !(right < left);
}

////////////////////////////////////////////////////////////
bool operator >=(const Utf8& left, const Utf8& right)
{
    
return !(left < right);
}

////////////////////////////////////////////////////////////
Utf8 operator +(const Utf8& left, const Utf8& right)
{
    Utf8 
string = left;
    
string += right;

    
return string;
}

// namespace sf
使用這個代替原有的String應該可以正確顯示中文 有空試下
posted on 2015-11-20 13:09 ccsdu2009 閱讀(654) 評論(0)  編輯 收藏 引用 所屬分類: Game引擎
 
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            国产亚洲人成a一在线v站| 日韩视频在线一区二区三区| 黑人一区二区三区四区五区| 久久精品视频在线| 欧美高清视频| 亚洲小说欧美另类婷婷| 国产精品一二三| 久久久av网站| 亚洲国产人成综合网站| 亚洲一级片在线观看| 国产日韩欧美制服另类| 美女精品在线| 9l国产精品久久久久麻豆| 久久精品在线免费观看| 亚洲黄色在线视频| 国产精品v日韩精品| 久久久国产精品一区| 亚洲国产精品毛片| 欧美一区二区三区在线播放| 亚洲电影成人| 国产精品久久久久久户外露出| 久久国产毛片| 亚洲久久在线| 美女啪啪无遮挡免费久久网站| 一区二区三区**美女毛片| 国产精品网曝门| 欧美不卡视频一区| 午夜在线电影亚洲一区| 亚洲激情成人在线| 久久久精品免费视频| 日韩亚洲欧美在线观看| 国内精品久久久久影院 日本资源| 欧美xart系列在线观看| 亚洲欧美一区在线| 亚洲伦理中文字幕| 蜜桃av噜噜一区| 性做久久久久久久免费看| 亚洲啪啪91| 狠狠色狠狠色综合日日五| 国产精品成人aaaaa网站| 欧美.www| 久久久久久久久久久久久久一区 | 久久精品国产免费看久久精品| 亚洲国产视频直播| 久久久久在线观看| 亚洲欧美欧美一区二区三区| 亚洲精品日韩在线观看| 韩国女主播一区二区三区| 欧美色欧美亚洲另类七区| 媚黑女一区二区| 久久久精品一区| 午夜精品偷拍| 亚洲欧美在线aaa| 一区二区三区成人精品| 亚洲国内在线| 欧美激情一区三区| 欧美国产欧美亚洲国产日韩mv天天看完整| 亚洲欧美视频一区| 亚洲尤物精选| 亚洲午夜av电影| 亚洲午夜国产一区99re久久 | 免费亚洲一区二区| 久久久久久97三级| 久久激五月天综合精品| 亚洲欧美一区二区精品久久久| 一本色道久久综合狠狠躁篇的优点 | 欧美成年人网站| 浪潮色综合久久天堂| 久久欧美肥婆一二区| 久久激情一区| 久久综合国产精品| 麻豆成人91精品二区三区| 久久综合中文| 蜜臀av一级做a爰片久久| 欧美高清免费| 亚洲国产欧美一区二区三区同亚洲| 欧美国产欧美亚州国产日韩mv天天看完整 | 一区二区三区日韩在线观看| 日韩午夜三级在线| 亚洲天堂av在线免费观看| 亚洲午夜av在线| 亚洲欧美中文另类| 欧美专区第一页| 美女诱惑一区| 欧美日韩福利在线观看| 国产精品嫩草影院av蜜臀| 国产精品丝袜白浆摸在线| 国内精品亚洲| 亚洲破处大片| 亚洲视屏在线播放| 久久久www| 欧美大片在线看免费观看| 91久久精品一区二区三区| 99re8这里有精品热视频免费 | 亚洲丰满少妇videoshd| 91久久精品国产| 亚洲图片激情小说| 欧美专区福利在线| 欧美精品免费观看二区| 欧美午夜宅男影院在线观看| 国产欧美精品一区二区色综合 | 久久久久久夜| 欧美精品系列| 国产亚洲免费的视频看| 亚洲七七久久综合桃花剧情介绍| 亚洲午夜视频| 美女诱惑黄网站一区| 亚洲日韩视频| 欧美一区二视频| 欧美国产综合视频| 国产一区二区精品久久| 亚洲激情第一区| 欧美一区二区精品在线| 亚洲成人在线网| 亚洲综合好骚| 蜜桃视频一区| 亚洲午夜视频在线观看| 久久在线免费观看| 国产精品日韩精品欧美在线| 亚洲国产高清高潮精品美女| 亚洲一区二区三区欧美| 欧美激情一级片一区二区| 亚洲欧美日韩爽爽影院| 欧美激情一区二区在线| 国产一区在线视频| 亚洲午夜久久久| 欧美成人资源网| 羞羞视频在线观看欧美| 欧美激情女人20p| 伊人成人在线视频| 欧美一级成年大片在线观看| 亚洲欧洲精品天堂一级| 久久精品一区二区三区四区| 国产精品久久国产三级国电话系列 | 欧美一区在线看| 国产精品区一区二区三区| 亚洲精品一区中文| 看片网站欧美日韩| 午夜精品久久久久久久白皮肤 | 久久男人资源视频| 国产精品一区二区女厕厕| 夜夜嗨av一区二区三区四区| 欧美va天堂在线| 欧美中文字幕第一页| 国产精品视频一区二区三区| 一区二区三区欧美在线| 欧美激情中文字幕一区二区| 久久久国产成人精品| 国产一区999| 亚洲欧美日韩一区二区| aa级大片欧美三级| 欧美日韩精品高清| 99这里只有精品| 亚洲精品偷拍| 欧美日韩亚洲另类| 一本色道久久加勒比88综合| 亚洲高清久久| 欧美精品v国产精品v日韩精品| 亚洲电影有码| 亚洲成色777777女色窝| 欧美 日韩 国产 一区| 91久久精品日日躁夜夜躁欧美| 欧美成黄导航| 欧美激情欧美狂野欧美精品 | 亚洲第一网站免费视频| 免费成人黄色av| 亚洲精品久久久久久久久久久久| 欧美大胆成人| 欧美国产一区二区| 这里只有精品丝袜| 一区二区三区四区五区精品| 国产精品福利在线观看| 欧美影院成人| 久久久久久9999| 亚洲精品在线视频| 99国产精品久久久久老师| 国产精品久久夜| 久久婷婷av| 欧美freesex交免费视频| 夜夜嗨av一区二区三区四区| 宅男精品视频| 国产一区二区三区免费观看| 免费观看在线综合色| 欧美精品999| 欧美亚洲一级| 久久久久亚洲综合| 一区二区三区|亚洲午夜| 亚洲男人的天堂在线观看| 精品成人久久| 亚洲人成在线观看| 国产日韩欧美一区在线| 欧美电影免费观看网站| 欧美视频一区在线| 裸体一区二区三区| 欧美日韩国产欧美日美国产精品| 欧美伊人久久久久久久久影院| 久久影院午夜论| 亚洲尤物在线视频观看| 久久久一区二区三区| 一区二区免费在线播放|