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>2024-07-14 14:50:01 +0200
commit10374ca23413c7e2f85a8b773f90250b5408195e (patch)
treeea07fd347ae9eb286923c8d64fb680aaa1aa374c /libste.3
parentfce8d1ec3329a97fc8886cf71eb3d1a763d71ad7 (diff)
downloadlibste-10374ca23413c7e2f85a8b773f90250b5408195e.tar.gz
libste-10374ca23413c7e2f85a8b773f90250b5408195e.tar.xz
libste-10374ca23413c7e2f85a8b773f90250b5408195e.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