docs: fix threading module documentation discrepancies
- Fix include paths: use #include "Threading/..." instead of <XCEngine/Threading/...> - Document protected ITask constructors (ITask(), ITask(TaskPriority)) - Document Callback typedef in TaskGroup - Clarify Mutex STL-compatible methods are const - Note GetProgress() implementation limitation (returns 0.0f)
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
# String::Length / Capacity / Empty
|
||||
# String::Length / Size / Capacity / Empty
|
||||
|
||||
```cpp
|
||||
SizeType Length() const;
|
||||
SizeType Size() const;
|
||||
SizeType Capacity() const;
|
||||
bool Empty() const;
|
||||
```
|
||||
@@ -12,6 +13,7 @@ bool Empty() const;
|
||||
|
||||
**返回:**
|
||||
- `Length()` - 返回字符串的字符数(不包括终止 null 字符)
|
||||
- `Size()` - 与 `Length()` 功能相同,返回字符串的字符数
|
||||
- `Capacity()` - 返回已分配的存储容量
|
||||
- `Empty()` - 如果字符串为空则返回 `true`
|
||||
|
||||
@@ -28,6 +30,7 @@ int main() {
|
||||
|
||||
XCEngine::Containers::String s2("Hello");
|
||||
std::cout << "Length: " << s2.Length() << std::endl; // 输出: Length: 5
|
||||
std::cout << "Size: " << s2.Size() << std::endl; // 输出: Size: 5
|
||||
std::cout << "Capacity: " << s2.Capacity() << std::endl; // 输出: Capacity: 6 或更大
|
||||
|
||||
s2.Reserve(100);
|
||||
|
||||
Reference in New Issue
Block a user