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

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 閱讀(640) 評論(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>
            亚洲第一级黄色片| 亚洲欧洲精品一区二区三区波多野1战4 | 久久国产一二区| 久久婷婷国产综合尤物精品| 久久久午夜精品| 欧美成人按摩| 亚洲一区二区三区精品在线观看| 亚洲欧美日韩爽爽影院| 裸体歌舞表演一区二区| 欧美精品在线免费| 国产曰批免费观看久久久| 亚洲激情欧美激情| 亚洲欧美日韩在线| 欧美成人激情视频| 亚洲综合成人在线| 欧美高清在线一区| 国产一区二区三区奇米久涩| 亚洲精品在线免费| 久久久天天操| 亚洲一区二区免费在线| 欧美激情一区二区三区在线视频观看 | 一区二区三区在线免费观看| 中文无字幕一区二区三区| 久久久久国色av免费观看性色| 亚洲高清久久久| 欧美一区午夜视频在线观看| 欧美日韩1区2区| 亚洲欧洲偷拍精品| 美女亚洲精品| 午夜精品影院在线观看| 欧美天堂亚洲电影院在线观看 | 红桃视频成人| 欧美一区二区高清| 99精品欧美一区二区三区| 欧美1区2区| 亚洲第一页中文字幕| 老巨人导航500精品| 新狼窝色av性久久久久久| 国产精品video| 亚洲一级高清| 亚洲视频在线观看视频| 欧美另类视频在线| 亚洲毛片在线免费观看| 欧美肥婆在线| 你懂的国产精品| 亚洲高清色综合| 欧美肥婆在线| 久久在线视频在线| 亚洲第一区色| 欧美国产三区| 欧美粗暴jizz性欧美20| 亚洲激情午夜| 亚洲福利免费| 欧美激情第10页| 亚洲午夜一区| 亚洲无线一线二线三线区别av| 欧美午夜性色大片在线观看| 一本色道久久综合亚洲二区三区| 亚洲免费av观看| 国产精品成人一区二区三区夜夜夜| 亚洲专区在线视频| 亚洲欧美日韩在线| 精品成人一区二区三区四区| 免费成人你懂的| 噜噜噜躁狠狠躁狠狠精品视频 | 欧美日韩免费在线| 亚洲欧美日韩一区二区| 亚洲欧美一区二区精品久久久| 国产美女扒开尿口久久久| 久久激情网站| 免费亚洲电影在线| 一区二区不卡在线视频 午夜欧美不卡'| 亚洲精品免费在线| 国产精品视频内| 欧美国产日韩一区| 欧美视频1区| 久久人人超碰| 欧美区亚洲区| 久久精品在线观看| 欧美日本中文| 久久久久综合一区二区三区| 蜜臀va亚洲va欧美va天堂| 亚洲一区在线视频| 久久精品人人爽| 国产精品99久久久久久久久 | 欧美国产日韩一区二区三区| 欧美三级视频在线播放| 欧美中文字幕不卡| 欧美黄色免费网站| 久久久av水蜜桃| 欧美伦理91i| 裸体丰满少妇做受久久99精品| 欧美日韩国产美| 久久九九国产精品怡红院| 欧美国产日韩精品免费观看| 久久aⅴ国产紧身牛仔裤| 欧美激情小视频| 久久精品亚洲| 国产精品高清网站| 欧美大胆人体视频| 国内外成人免费激情在线视频网站 | 先锋影音国产一区| 欧美激情第五页| 免费久久99精品国产自| 国产日韩av在线播放| 日韩小视频在线观看专区| 亚洲国产精品成人综合| 欧美一区二区三区在| 亚洲砖区区免费| 欧美体内she精视频| 亚洲精品久久久久| 亚洲国产精品www| 久久看片网站| 久久久精品免费视频| 国产精品亚发布| 一本色道久久99精品综合| 亚洲国产精品综合| 久久久最新网址| 麻豆成人91精品二区三区| 国产精品久久久久久久久久妞妞| 亚洲精品综合精品自拍| 亚洲破处大片| 欧美激情一区二区在线| 欧美二区在线| 亚洲精品乱码久久久久久蜜桃91| 久久人人超碰| 欧美国产亚洲视频| 亚洲韩国青草视频| 欧美成人中文| 亚洲国产天堂久久综合网| 亚洲免费观看高清在线观看| 噜噜噜噜噜久久久久久91| 亚洲第一福利视频| 亚洲免费激情| 欧美日韩在线不卡| 在线一区日本视频| 校园激情久久| 精品福利电影| 欧美久久婷婷综合色| 亚洲精品一区中文| 欧美一区二区在线观看| 极品av少妇一区二区| 女仆av观看一区| 亚洲免费久久| 久久精品欧洲| 亚洲第一精品影视| 欧美色综合天天久久综合精品| 一区二区三区视频观看| 久久久成人网| 亚洲人成人77777线观看| 欧美天堂在线观看| 欧美一区2区三区4区公司二百| 麻豆精品视频在线观看| 日韩午夜免费视频| 国产麻豆成人精品| 免费成人黄色av| 亚洲一区二区三区在线播放| 免费高清在线视频一区·| 夜夜夜精品看看| 国产视频在线观看一区二区三区| 另类图片综合电影| 一本色道久久综合狠狠躁篇怎么玩| 久久国产66| 亚洲精品小视频| 国产伦精品一区二区三区| 麻豆精品精品国产自在97香蕉| 一区二区欧美激情| 两个人的视频www国产精品| 一区二区免费看| 一区免费视频| 国产农村妇女毛片精品久久麻豆| 老司机午夜精品| 亚洲欧美日韩精品久久奇米色影视 | 亚洲国产91精品在线观看| 亚洲综合日韩中文字幕v在线| 国外成人在线| 国产精品ⅴa在线观看h| 噜噜噜噜噜久久久久久91| 午夜免费电影一区在线观看| 亚洲茄子视频| 欧美成人在线免费观看| 欧美怡红院视频一区二区三区| 亚洲人人精品| 激情亚洲网站| 国产午夜精品理论片a级大结局| 欧美大片在线观看一区二区| 久久亚洲精品网站| 亚洲一区二区动漫| 在线亚洲欧美视频| 99精品视频一区| 日韩午夜三级在线| 91久久黄色| 亚洲国产精品日韩| 欧美国产欧美亚洲国产日韩mv天天看完整 | 国产性色一区二区| 国产精品无码专区在线观看| 国产精品久久久久av| 欧美日韩二区三区| 欧美日韩不卡| 欧美日韩亚洲精品内裤|