Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ././../../../../../../usr/man/man3gen/strfind.3gen
Real path: /usr/share/man/man3gen/strfind.3gen
Zurück
'\" te .\" Copyright (c) 1989, AT&T. All rights reserved. .\" Portions Copyright (c) 1999, 2021, Oracle and/or its affiliates. .TH strfind 3GEN "11 May 2021" "Oracle Solaris 11.4" "String Pattern-Matching Library Functions" .SH NAME strfind, strrspn, strtrns \- string manipulations .SH SYNOPSIS .LP .nf cc [ \fIflag\fR ... ] \fIfile\fR ... \fB-lgen\fR [ \fIlibrary\fR ... ] #include <libgen.h> \fBint\fR \fBstrfind\fR(\fBconst char *\fR\fIas1\fR, \fBconst char *\fR\fIas2\fR); .fi .LP .nf \fBchar *\fR\fBstrrspn\fR(\fBconst char *\fR\fIstring\fR, \fBconst char *\fR\fItc\fR); .fi .LP .nf \fBchar *\fR \fBstrtrns\fR(\fBconst char *\fR\fIstring\fR, \fBconst char *\fR\fIold\fR, \fBconst char *\fR\fInew\fR, \fBchar *\fR\fIresult\fR); .fi .SH DESCRIPTION .sp .LP The \fBstrfind()\fR function returns the offset of the first occurrence of the second string, \fIas2\fR, if it is a substring of string \fIas1\fR. If the second string is not a substring of the first string \fBstrfind()\fR returns \fB\(mi1\fR. .sp .LP The \fBstrrspn()\fR function trims characters from a string. It searches from the end of \fIstring\fR for the first character that is not contained in \fItc\fR. If such a character is found, \fBstrrspn()\fR returns a pointer to the next character; otherwise, it returns a pointer to \fIstring\fR. .sp .LP The \fBstrtrns()\fR function transforms \fIstring\fR and copies it into \fIresult\fR. Any character that appears in \fIold\fR is replaced with the character in the same position in \fInew\fR. The \fInew\fR result is returned. .SH EXAMPLES .LP \fBExample 1\fR An example of the \fBstrfind()\fR function. .sp .in +2 .nf /* find offset to substring "hello" within as1 */ i = strfind(as1, "hello"); /* trim junk from end of string */ s2 = strrspn(s1, "*?#$%"); *s2 = '\e0'; /* transform lowercase to uppercase */ a1[] = "abcdefghijklmnopqrstuvwxyz"; a2[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; s2 = strtrns(s1, a1, a2, s2); .fi .in -2 .sp .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ MT-Level MT-Safe .TE .sp .SH SEE ALSO .sp .LP \fBstring\fR(3C), \fBattributes\fR(7)