Lines Matching defs:str
1304 char* ImStrdup(const char* str)
1306 size_t len = strlen(str);
1308 return (char*)memcpy(buf, (const void*)str, len + 1);
1325 const char* ImStrchrRange(const char* str, const char* str_end, char c)
1327 const char* p = (const char*)memchr(str, (int)c, str_end - str);
1331 int ImStrlenW(const ImWchar* str)
1333 //return (int)wcslen((const wchar_t*)str); // FIXME-OPT: Could use this when wchar_t are 16-bits
1335 while (*str++) n++;
1340 const char* ImStreolRange(const char* str, const char* str_end)
1342 const char* p = (const char*)memchr(str, '\n', str_end - str);
1375 // Trim str by offsetting contents when there's leading data + writing a \0 at the trailing position. We use this in situation where the cost is negligible.
1578 const unsigned char* str = (const unsigned char*)in_text;
1579 if (!(*str & 0x80))
1581 c = (unsigned int)(*str++);
1585 if ((*str & 0xe0) == 0xc0)
1588 if (in_text_end && in_text_end - (const char*)str < 2) return 1;
1589 if (*str < 0xc2) return 2;
1590 c = (unsigned int)((*str++ & 0x1f) << 6);
1591 if ((*str & 0xc0) != 0x80) return 2;
1592 c += (*str++ & 0x3f);
1596 if ((*str & 0xf0) == 0xe0)
1599 if (in_text_end && in_text_end - (const char*)str < 3) return 1;
1600 if (*str == 0xe0 && (str[1] < 0xa0 || str[1] > 0xbf)) return 3;
1601 if (*str == 0xed && str[1] > 0x9f) return 3; // str[1] < 0x80 is checked below
1602 c = (unsigned int)((*str++ & 0x0f) << 12);
1603 if ((*str & 0xc0) != 0x80) return 3;
1604 c += (unsigned int)((*str++ & 0x3f) << 6);
1605 if ((*str & 0xc0) != 0x80) return 3;
1606 c += (*str++ & 0x3f);
1610 if ((*str & 0xf8) == 0xf0)
1613 if (in_text_end && in_text_end - (const char*)str < 4) return 1;
1614 if (*str > 0xf4) return 4;
1615 if (*str == 0xf0 && (str[1] < 0x90 || str[1] > 0xbf)) return 4;
1616 if (*str == 0xf4 && str[1] > 0x8f) return 4; // str[1] < 0x80 is checked below
1617 c = (unsigned int)((*str++ & 0x07) << 18);
1618 if ((*str & 0xc0) != 0x80) return 4;
1619 c += (unsigned int)((*str++ & 0x3f) << 12);
1620 if ((*str & 0xc0) != 0x80) return 4;
1621 c += (unsigned int)((*str++ & 0x3f) << 6);
1622 if ((*str & 0xc0) != 0x80) return 4;
1623 c += (*str++ & 0x3f);
2128 void ImGuiTextBuffer::append(const char* str, const char* str_end)
2130 int len = str_end ? (int)(str_end - str) : (int)strlen(str);
2142 memcpy(&Buf[write_off - 1], str, (size_t)len);
2566 ImGuiID ImGuiWindow::GetID(const char* str, const char* str_end)
2569 ImGuiID id = ImHashStr(str, str_end ? (str_end - str) : 0, seed);
2582 ImGuiID ImGuiWindow::GetIDNoKeepAlive(const char* str, const char* str_end)
2585 return ImHashStr(str, str_end ? (str_end - str) : 0, seed);