⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.23
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
local
/
src
/
netdata
/
src
/
libnetdata
/
string
/
View File Name :
README.md
<!-- title: "String" custom_edit_url: https://github.com/netdata/netdata/edit/master/src/libnetdata/string/README.md sidebar_label: "String" learn_status: "Published" learn_topic_type: "Tasks" learn_rel_path: "Developers/libnetdata" --> # STRING STRING provides a way to allocate and free text strings, while de-duplicating them. It can be used similarly to libc string functions: - `strdup()` and `strdupz()` become `string_strdupz()`. - `strlen()` becomes `string_strlen()` (and it does not walkthrough the bytes of the string). - `free()` and `freez()` become `string_freez()`. There is also a special `string_dup()` function that increases the reference counter of a STRING, avoiding the index lookup to find it. Once there is a `STRING *`, the actual `const char *` can be accessed with `string2str()`. All STRING should be constant. Changing the contents of a `const char *` that has been acquired by `string2str()` should never happen.