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

Function CheckForUTF16String

core/debuggercontroller.cpp:1932–1955  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1930
1931
1932static std::string CheckForUTF16String(const DataBuffer& memory)
1933{
1934 std::string result;
1935 size_t i = 0;
1936 while (true)
1937 {
1938 if (i > memory.GetLength() - 2)
1939 break;
1940 if (IsPrintableChar(memory[i]) && (memory[i + 1] == 0))
1941 {
1942 result += memory[i];
1943 i += 2;
1944 }
1945 else
1946 {
1947 break;
1948 }
1949 }
1950
1951 if (result.length() >= 4)
1952 return result;
1953 else
1954 return "";
1955}
1956
1957
1958static std::string CheckForUTF32String(const DataBuffer& memory)

Callers 1

CheckForPrintableStringFunction · 0.85

Calls 1

IsPrintableCharFunction · 0.85

Tested by

no test coverage detected