diff --git a/share/man/man7/d.7 b/share/man/man7/d.7 --- a/share/man/man7/d.7 +++ b/share/man/man7/d.7 @@ -198,6 +198,66 @@ Suitable for timestamping logs. .El .Sh BUILT-IN FUNCTIONS +.Bl -tag +.It Ft string Fn strchr "string" "char" +Return a substring of +.Fa string +starting at the first occurance of +.Fa char +in +.Fa string . +Similar to +.Xr strchr 3 . +.It Ft string Fn strjoin "string1" "string2" +Return a string resulting from concatenating +.Va string1 +and +.Va string2 . +Similar to +.Xr strcat 3 . +.It Ft string Fn strrchr "string" "char" +Return a substring of +.Va string +starting at the last occurance of +.Fa char +in +.Fa string . +Similar to +.Xr strrchr 3 . +.It Ft string Fn strstr "haystack" "needle" +Return a substring of +.Fa haystack +starting at the first occurrence of +.Fa needle . +Similar to +.Xr strstr 3 . +.It Ft string Fn strtok "string" "separators" +Tokenize +.Fa string +with +.Fa separators . +Similar to +.Xr strtok 3 . +.It Ft size_t Fn strlen "string" +Find the length of +.Fa string . +Similar to +.Xr strlen 3 . +.It Ft string Fn substr "string" "position" "[length]" +Get a +substring of +.Fa string +starting at +.Fa position . +The substring will be at most +.Fa length Ns -long . +If +.Fa length +is not specified, use the rest of the string. +Similar to +.Xr awk 1 Ap s +.Fn substr . +.El .Ss Aggregation Functions .Bl -tag -compact -width "llquantize(value, factor, low, high, nsteps)" .It Fn avg value