Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

stsubstitutestring(3) [debian man page]

ststring(3)						    ShapeTools Toolkit Library						       ststring(3)

NAME
stConvertPattern, stSubstituteString, stStrtok, stStrEnter - string handling SYNOPSIS
#include <config.h> #include <sttk.h> char* stConvertPattern (char *pattern); char* stSubstituteString (char *original, char *old, char *new); char* stStrtok (char *string); char* stStrEnter (char *string); DESCRIPTION
stConvertPattern converts sh(1) filename generation patterns to ed(1) string patterns. question (?) gets converted to period (.) asterisk (*) gets converted to a period followed by an asterisk (.*) period (.) will be escaped by a backslash character (.). exclam (!) gets converted to circumflex (^) if it follows an left bracket ([). Otherwise it remains unmodified. The whole pattern will be enclosed in a circumflex (^) as leftmost an a dollar sign ($) as rightmost character. stSubstituteString replaces all occurrences of substring old in original by string new. It returns a pointer to an allocated string that is the result of this operation. Returns NULL if anything goes seriously wrong. stStrtok considers the string string to consist of a sequence of zero or more text tokens separated by whitespace. The first call (with pointer string specified) returns a pointer to the first character of the first token, and will have written a null character into string immediately following the returned token. The function keeps track of its position between separate calls, so that subsequent calls (which must be made with the string argument set to NULL) will work through the string immediately following that token. In this way subsequent calls will work through the string until no tokens remain. When no token remains in string, a NULL pointer is returned. stStrEnter adds the given string to an internal string table and returns a pointer to appropriate string table entry. Equal strings are mapped to equal locations in the table. Equality of two strings in the string table can be checked by simple pointer comparison. SEE ALSO
sh (1), ed (1) sttk-1.7 Thu Jun 24 17:43:33 1993 ststring(3)

Check Out this Related Man Page

sttk_intro(3)						    ShapeTools Toolkit Library						     sttk_intro(3)

NAME
sttk_intro - introduction to the ShapeTools Toolkit Library SYNOPSIS
#include <config.h> #include <sttk.h> char* stVersion (void); DESCRIPTION
The ShapeTools Toolkit library (sttk) is a set of functions to be used in various parts of the ShapeTools configuration management toolkit. Inclusion of config.h may be omitted when atfs.h is included. stVersion returns a version identification string for the ShapeTools Toolkit library. LIST OF FUNCTIONS AND VARIABLES
Name Appears on PageDescription stAbortThis sttransaction.3abort transaction stAskConfirm stuserio.3 ask user for confirmation stCallCmd stcall.3 call command stCallCmdErrno stcall.3error code returned by command (variable) stCallEditor stcall.3 call editor with default contents stCatchSigs stsignal.3 catch signals stCleanup stsignal.3 do cleanup (remove temporary files etc.) stConvertPattern ststring.3convert sh(1) pattern to regex pattern stExit stsignal.3 stop program execution stFindProgram stcall.3 check if file exists and is executable stGetFromStdin stuserio.3read text from standard input stGetTermWidth stuserio.3get current terminal width in columns stInterruptAction stsignal.3address of signal handler for SIGINT (variable) stLog stuserio.3 print message stMessage stuserio.3 buffer for constructing messages (variable) stMktime sttime.3 parse time string stParseArgs stparseargs.3 parse command line arguments stProgramName stuserio.3 name how program was called stQuietFlag stuserio.3 suppress normal messages (no error messages) (variable) stQuitAction stsignal.3 address of signal handler for SIGQUIT (variable) stRegisterFile sttmpfiles.3register file stRmRegisteredFiles sttmpfiles.3remove all registered files stShortUsage stparseargs.3 print usage string stShutupFlag stuserio.3 supress all messages (variable) stStrEnter ststring.3 enter string to string table stStrtok ststring.3 tokenize string stSubstituteString ststring.3replace parts of a string by new string stTermAction stsignal.3 address of signal handler for SIGTERM (variable) stThisTransaction sttransaction.3current transaction (variable) stTmpFile sttmpfiles.3 return unique name for temporary file stUnRegisterFile sttmpfiles.3unregister file stVersion sttkintro.3 print version identification string stWriteTime sttime.3 generate time string SEE ALSO
Andreas Lampen and Axel Mahler (Eds.) ShapeTools, Technical Report No. 92-14, Technische Universitat Berlin, May 1992 sttk-1.7 Thu Jun 24 17:43:28 1993 sttk_intro(3)
Man Page