522 lines · 16.6 KB · C++
RawDownload
            _encoded_str = (_is_alloc) ? reinterpret_cast<char *>(_mem.alloc) : reinterpret_cast<char *>(_mem.local);            return _encoded_str;        }         const auto rune_str = (_is_alloc) ? reinterpret_cast<rune_t *>(_mem.alloc) : reinterpret_cast<rune_t *>(_mem.local);        const auto str_len = (_length * _character_size) + 1; // Plus 1 for a null terminator         auto encoded_str_local = alloc_memory<char>(str_len);         auto s = reinterpret_cast<uint8_t *>(encoded_str_local);        for (auto i = word_t{ 0 }; i < _length; ++i)        {            auto curr_rune = rune_str[i];            s = utf8::encode(curr_rune, s);        }         // Ensure the final value is null.        *s = 0;         _encoded_str = encoded_str_local;        return _encoded_str;    }}

Lines 501–522 of 522. Previous lines

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t