about summary refs log tree commit diff
path: root/libste.3
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2023-11-03 18:13:05 +0100
committerLeah Neukirchen <leah@vuxu.org>2023-11-03 18:13:05 +0100
commit6cd51d52e177314a68c6c2f6c598798136ba1b52 (patch)
treeaa9053881d115610550f3a55f2e0fb64773f231a /libste.3
parentfce8d1ec3329a97fc8886cf71eb3d1a763d71ad7 (diff)
downloadlibste-master.tar.gz
libste-master.tar.xz
libste-master.zip
add steccpy HEAD master
Diffstat (limited to 'libste.3')
-rw-r--r--libste.322
1 files changed, 21 insertions, 1 deletions
diff --git a/libste.3 b/libste.3
index c739a07..994d12a 100644
--- a/libste.3
+++ b/libste.3
@@ -12,6 +12,8 @@
 .Ft "char *"
 .Fn stecpy "char *dst" "char *end" "const char *src"
 .Ft "char *"
+.Fn steccpy "char *dst" "char *end" "const char *src" "int c"
+.Ft "char *"
 .Fn stecpe "char *dst" "char *end" "const char *src" "const char *srcend"
 .Ft "char *"
 .Fn stechr "const char *src" "const char *end" "int c"
@@ -19,7 +21,7 @@
 .Fn steprn "char *dst" "char *end" "const char *fmt" "..."
 .Sh DESCRIPTION
 .Nm libste
-provides four useful functions for dealing with strings.
+provides five useful functions for dealing with strings.
 .Pp
 .Nm stecpy
 copies the NUL-terminated string
@@ -36,6 +38,24 @@ On truncation,
 .Fa end
 is returned.
 .Pp
+.Nm steccpy
+copies the NUL-terminated string
+.Fa src
+to
+.Fa dst ,
+stopping when the character
+.Fa c
+is found.
+It writes no characters beyond
+.Fa end .
+If any characters are copied,
+.Fa dst
+will be NUL-terminated
+and the return value is a pointer to the NUL byte.
+On truncation,
+.Fa end
+is returned.
+.Pp
 .Nm stecpe
 copies the string between
 .Fa src