op_string.c File Reference
general purpose C string handling implementation.
More...
#include <string.h>
#include "op_libiberty.h"
Detailed Description
general purpose C string handling implementation.
- Author:
- John Levon
-
Philippe Elie
Function Documentation
| int comment_line |
( |
char const * |
c |
) |
|
- Parameters:
-
return non zero if c string is a comment. Comment are lines with optional blank space at left then a '#' character. Blank space are in " \t\n"
References skip_ws().
Referenced by main().
| int empty_line |
( |
char const * |
c |
) |
|
- Parameters:
-
return non zero if c string contains only blank space where blank space are in " \t\n"
References skip_ws().
Referenced by main().
| size_t op_hash_string |
( |
char const * |
s |
) |
|
| char* op_xstrndup |
( |
char const * |
s, |
|
|
size_t |
len | |
|
) |
| | |
- Parameters:
-
| s,: | input string |
| len,: | len char to copy |
Allocate and copy len character from s to a newly allocated buffer then append a '' terminator. Return the newly allocated string
Referenced by opd_ext_initialize().
| char const* skip_nonws |
( |
char const * |
c |
) |
|
- Parameters:
-
return a pointer to the first location in c which is a blank space where blank space are in " \t\n"
Referenced by main().
| char const* skip_ws |
( |
char const * |
c |
) |
|
- Parameters:
-
return a pointer to the first location in c which is not a blank space where blank space are in " \t\n"
Referenced by comment_line(), empty_line(), and main().
| int strisprefix |
( |
char const * |
str, |
|
|
char const * |
prefix | |
|
) |
| | |
- Parameters:
-
| str,: | string to test |
| prefix,: | prefix string |
return non zero if prefix parameters is a prefix of str
Referenced by main(), and parse_extra().