/[global]/global/libutil/locatestring.c
ViewVC logotype

Diff of /global/libutil/locatestring.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by shigio, Tue May 10 05:17:52 2005 UTC revision 1.13 by shigio, Sat Sep 3 10:22:42 2005 UTC
# Line 36  extern int debug; Line 36  extern int debug;
36  #include "locatestring.h"  #include "locatestring.h"
37    
38  /*  /*
39    
40    String locator: usage and memory status
41    
42            'v': result pointer
43    
44    string = "ABC XYZ XYZ ABC"
45    
46    pointer = locatestring(string, "XYZ", MATCH_FIRST);
47                 v
48            "ABC XYZ XYZ ABC"
49    
50    pointer = locatestring(string, "XYZ", MATCH_LAST);
51                     v
52            "ABC XYZ XYZ ABC"
53    
54    pointer = locatestring(string, "XYZ", MATCH_AT_FIRST);
55    
56            "ABC XYZ XYZ ABC" (nothing pointed)
57    
58    pointer = locatestring(string, "ABC", MATCH_AT_FIRST);
59                v
60            "ABC XYZ XYZ ABC" (point the following character)
61    
62    pointer = locatestring(string, "ABC", MATCH_AT_LAST);
63                         v
64            "ABC XYZ XYZ ABC"
65    
66    pointer = locatestring(string, "ABC XYZ XYZ ABC", MATCH_COMPLETE);
67             v
68            "ABC XYZ XYZ ABC"
69    
70    pointer = locatestring(string, "xyZ", MATCH_FIRST|IGNORE_CASE);
71                 v
72            "ABC XYZ XYZ ABC"
73    
74     */
75    
76    /*
77   * strincmp: strncmp with ignoring case.   * strincmp: strncmp with ignoring case.
78   *   *
79   *      Interface is same with strncmp.   *      Interface is same with strncmp.

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26