Уровень 0 · материалов: 5
В кластер включены документы, посвященные типам строк, их реализации, кодировкам и методам форматирования текста. Документы о структурах данных, приведении типов, указателях и интеграции языков исключены.
Общие признаки: реализации строк в C++, сравнение классов String, StringBuffer и StringBuilder в Java, макросы TCHAR и LPCTSTR в Windows, форматирование строк и генерация JSON
Группа выше: Регулярные выражения и обработка текста
Смысл: The text explores the variety of string implementations in C++ and game engines, using a 'zoo' metaphor to categorize them by their behavior, performance characteristics, and historical context, ultimately arguing that no single string type fits every scenario.
An analysis of various C++ string implementations, from low-level pointers and standard containers to high-performance game engine optimizations.
Смысл: The main idea of the text is to explain the functional and performance differences between the three primary Java classes used for character sequences—String, StringBuffer, and StringBuilder—to help developers choose the right tool based on immutability and thread-safety needs.
A technical guide explaining the differences between Java's immutable String class and the mutable, thread-safe StringBuffer and non-thread-safe StringBuilder classes.
Смысл: The main idea is to demystify the Windows-specific string type macros (TCHAR, LPCTSTR, etc.) and educate developers on how to write encoding-independent C++ code that supports both ANSI and Unicode by using the appropriate macros and avoiding dangerous type casting.
A comprehensive guide to Windows API string types explaining the difference between ANSI and Unicode, and how to use TCHAR and related macros for cross-encoding compatibility.
Смысл: The main idea is to demonstrate how to simplify complex string formatting in C++ by creating a wrapper class around `std::stringstream` using operator overloading and templates.
The author proposes a custom C++ wrapper class, `MakeString`, to eliminate the verbosity of `std::stringstream` when formatting strings for exceptions or logs.
Смысл: The author describes the transition from manual string formatting to a structured micro-library in C++ for generating JSON files. The core idea is to use C++ object lifecycles (destructors) to automatically handle the nesting and closing of JSON objects and arrays.
The author creates a C++ micro-library that uses RAII and object scopes to automatically generate correctly formatted JSON files.