MCPcopy Create free account
hub / github.com/Vector35/debugger / CheckForUTF32String

Function CheckForUTF32String

core/debuggercontroller.cpp:1958–1981  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1956
1957
1958static std::string CheckForUTF32String(const DataBuffer& memory)
1959{
1960 std::string result;
1961 size_t i = 0;
1962 while (true)
1963 {
1964 if (i > memory.GetLength() - 4)
1965 break;
1966 if (IsPrintableChar(memory[i]) && (memory[i + 1] == 0) && (memory[i + 2] == 0) && (memory[i + 3] == 0))
1967 {
1968 result += memory[i];
1969 i += 4;
1970 }
1971 else
1972 {
1973 break;
1974 }
1975 }
1976
1977 if (result.length() >= 4)
1978 return result;
1979 else
1980 return "";
1981}
1982
1983
1984static std::string CheckForPrintableString(const DataBuffer& memory)

Callers 1

CheckForPrintableStringFunction · 0.85

Calls 1

IsPrintableCharFunction · 0.85

Tested by

no test coverage detected