strfind man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



str(3G)								       str(3G)

NAME
     str: strfind, strrspn, strtrns - string manipulations

SYNOPSIS
     cc [flag ...] file ...  -lgen [library ...]

     #include <libgen.h>

     int strfind (const char *as1, const char *as2);

     char *strrspn (const char *string, const char *tc);

     char * strtrns (const char *str, const char *old, const char *new,
	 char *result);

DESCRIPTION
     strfind returns the offset of the second string, as2, if it is a
     substring of string as1.

     strrspn returns a pointer to the first character in the string to be
     trimmed (all characters from the first character to the end of string are
     in tc).

     strtrns transforms str and copies it into result.	Any character that
     appears in old is replaced with the character in the same position in
     new.  The new result is returned.

EXAMPLES
     /* find pointer to substring "hello" in as1 */
     i = strfind(as1, "hello");
     /* trim junk from end of string */
     s2 = strrspn(s1, "*?#$%");
     *s2 = '\0';
     /* transform lower case to upper case */
     a1[] = "abcdefghijklmnopqrstuvwxyz";
     a2[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
     s2 = strtrns(s1, a1, a2, s2);

SEE ALSO
     string(3C)

DIAGNOSTICS
     If the second string is not a substring of the first string strfind
     returns -1.

									Page 1

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net