MCPcopy Create free account
hub / github.com/OGRECave/ogre-next / _load_buffer_UTF8

Method _load_buffer_UTF8

OgreMain/src/OgreUTFString.cpp:1954–1974  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1952 }
1953
1954 void UTFString::_load_buffer_UTF8() const
1955 {
1956 _getBufferStr();
1957 std::string &buffer = ( *mBuffer.mStrBuffer );
1958 buffer.reserve( length() );
1959
1960 unsigned char utf8buf[6] = "";
1961 char *charbuf = (char *)utf8buf;
1962 unicode_char c;
1963 size_t len;
1964
1965 const_iterator i, ie = end();
1966 for( i = begin(); i != ie; i.moveNext() )
1967 {
1968 c = i.getCharacter();
1969 len = _utf32_to_utf8( c, utf8buf );
1970 size_t j = 0;
1971 while( j < len )
1972 buffer.push_back( charbuf[j++] );
1973 }
1974 }
1975
1976 void UTFString::_load_buffer_WStr() const
1977 {

Callers

nothing calls this directly

Calls 7

endFunction · 0.85
beginFunction · 0.85
moveNextMethod · 0.80
getCharacterMethod · 0.80
lengthFunction · 0.50
reserveMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected