"SfR Fresh" - the SfR Freeware/Shareware Archive

Member "xdialppp/mytokens.h" of archive xdialppp-0.4.4.src.nolib.tar.gz:


As a special service "SfR Fresh" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
    1 #ifndef __mytokens_h__
    2 #define __mytokens_h__
    3 
    4 /*  -------------------------------------------------------------------------
    5 	findSubStr(const char *thestring, const char *pattern)
    6 
    7 		function :
    8 			tries to find pattern in thestring
    9 		return :
   10 			the position where the pattern finishes + 1 if pattern
   11 				is found in thestring
   12 			-1 else
   13     ------------------------------------------------------------------------- */
   14 
   15 int findSubStr(const char *thestring, const char *pattern);
   16 
   17 
   18 /*  -------------------------------------------------------------------------
   19 	getToken(const char *message, const char *prompt)
   20 
   21 		function :
   22 			Returns a pointer to the string starting at the
   23 			point where prompt finishes.
   24 		return :
   25 			a char *
   26 			NULL if prompt is not found
   27 		How the hell do you use it ?
   28 			Example: you have the string "PHONE=264896"
   29 			you call getToken(string,"PHONE=")
   30 			and returns 264896
   31     ------------------------------------------------------------------------- */
   32 
   33 char *getToken(char * dest, const char *message, const char *prompt);
   34 
   35 
   36 int beginsWith(const char *message, char c);
   37 
   38 
   39 char * removeToken(char *dest, char * mystring, char c);
   40 
   41 
   42 
   43 #endif