fix: improve doc link navigation and tree display
- Fix link resolution with proper relative/absolute path handling - Improve link styling with underline decoration - Hide leaf nodes from tree, only show directories - Fix log file path for packaged app
This commit is contained in:
36
docs/api/containers/string/cstr.md
Normal file
36
docs/api/containers/string/cstr.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# String::CStr
|
||||
|
||||
```cpp
|
||||
const char* CStr() const;
|
||||
```
|
||||
|
||||
返回指向以 null 结尾的 C 字符串的指针。
|
||||
|
||||
**参数:** 无
|
||||
|
||||
**返回:** 指向内部字符数组的指针,以 null 结尾
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
```cpp
|
||||
#include "XCEngine/Containers/String.h"
|
||||
#include <iostream>
|
||||
#include <cstring>
|
||||
|
||||
int main() {
|
||||
XCEngine::Containers::String s("Hello World");
|
||||
|
||||
const char* cstr = s.CStr();
|
||||
std::cout << cstr << std::endl; // 输出: Hello World
|
||||
|
||||
std::cout << "Length: " << std::strlen(cstr) << std::endl; // 输出: Length: 11
|
||||
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [String 总览](string.md) - 返回类总览
|
||||
- [Length](size.md) - 获取长度
|
||||
Reference in New Issue
Block a user