docs/Writerside/topics/string.h.md

changeset 1668
3ffdfe1776b4
parent 1667
608cc0b25352
child 1671
cf19b7820ff0
--- a/docs/Writerside/topics/string.h.md	Thu Dec 25 11:10:13 2025 +0100
+++ b/docs/Writerside/topics/string.h.md	Thu Dec 25 11:39:26 2025 +0100
@@ -150,6 +150,8 @@
 ```C
 #include <cx/string.h>
 
+char cx_strat(cxstring str, off_t index);
+
 cxstring cx_strchr(cxstring string, int chr);
 
 cxstring cx_strrchr(cxstring string, int chr);
@@ -175,6 +177,10 @@
 cxmutstr cx_strtrim_m(cxmutstr string);
 ```
 
+The function `cx_strat()` returns the character at the specified `index`.
+When the `index` is negative, the characters are counted from the end of the string.
+When the `index` is out of bounds, the zero-character is returned.
+
 The functions `cx_strchr()`, `cx_strrchr()`, and `cx_strstr()`, behave like their stdlib counterparts.
 
 The function `cx_strsubs()` returns the substring starting at the specified `start` index,

mercurial