MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / ToChar32

Function ToChar32

external/sentencepiece/src/trainer_interface_test.cc:31–34  ·  view source on GitHub ↗

Converts the 1 unicode string to the code point.

Source from the content-addressed store, hash-verified

29
30// Converts the 1 unicode string to the code point.
31static char32 ToChar32(absl::string_view str) {
32 string_util::UnicodeText utext = string_util::UTF8ToUnicodeText(str);
33 return !utext.empty() ? *utext.begin() : 0;
34}
35
36TEST(TrainerInterfaceTest, IsValidSentencePieceTest) {
37 TrainerSpec trainer_spec;

Callers 1

TESTFunction · 0.85

Calls 3

UTF8ToUnicodeTextFunction · 0.85
emptyMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected