MCPcopy Create free account
hub / github.com/ddnet/ddnet / UpdateStrData

Method UpdateStrData

src/game/client/lineinput.cpp:107–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107void CLineInput::UpdateStrData()
108{
109 str_utf8_stats(m_pStr, m_MaxSize, m_MaxChars, &m_Len, &m_NumChars);
110 if(!in_range<size_t>(m_CursorPos, 0, m_Len))
111 SetCursorOffset(m_CursorPos);
112 if(!in_range<size_t>(m_SelectionStart, 0, m_Len) || !in_range<size_t>(m_SelectionEnd, 0, m_Len))
113 SetSelection(m_SelectionStart, m_SelectionEnd);
114}
115
116const char *CLineInput::GetDisplayedString()
117{

Callers

nothing calls this directly

Calls 1

str_utf8_statsFunction · 0.85

Tested by

no test coverage detected