*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> str (3g)              
Title
Content
Arch
Section
 

Contents


str(3G)								       str(3G)


NAME    [Toc]    [Back]

     str: strfind, strrspn, strtrns - string manipulations

SYNOPSIS    [Toc]    [Back]

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

     #include <libgen.h>

     int strfind (const	char *as1<b>, const char *as2<b>);

     char *strrspn (const char *string<b>,	const char *tc<b>);

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

DESCRIPTION    [Toc]    [Back]

     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    [Toc]    [Back]

     /*	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    [Toc]    [Back]

      
      
     string(3C)

DIAGNOSTICS    [Toc]    [Back]

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


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
manip IRIX iostream out of band manipulations
XmCvtByteStreamToXmString HP-UX A compound string function that converts from a compound string in Byte Stream format to a compound string
XmStringFreeContext HP-UX A compound string function that releases the string scanning context data structure
XmStringConcatAndFree HP-UX A compound string function that appends one string to another and frees the original strings
XmStringDrawUnderline Tru64 A compound string function that underlines a string drawn in an X Window
XmStringDrawUnderline HP-UX A compound string function that underlines a string drawn in an X Window
DXmCvtOStoCS Tru64 Converts a string in the operating-systemspecific format to a compound string.
XmTextFieldInsert IRIX A TextField function that inserts a character string into a text string
DXmCvtFCtoCS Tru64 Converts a string in the file-compatible format to a compound string.
XmStringDrawUnderline IRIX A compound string function that underlines a string drawn in an X Window
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service