|
|
int | SCIPmemccpy (char *dest, const char *src, char stop, unsigned int cnt) |
|
void | SCIPprintSysError (const char *message) |
|
char * | SCIPstrtok (char *s, const char *delim, char **ptrptr) |
|
void | SCIPescapeString (char *t, int bufsize, const char *s) |
|
int | SCIPsnprintf (char *t, int len, const char *s,...) |
|
SCIP_Bool | SCIPstrToIntValue (const char *str, int *value, char **endptr) |
|
SCIP_Bool | SCIPstrToRealValue (const char *str, SCIP_Real *value, char **endptr) |
|
void | SCIPstrCopySection (const char *str, char startchar, char endchar, char *token, int size, char **endptr) |
|
int SCIPmemccpy |
( |
char * |
dest, |
|
|
const char * |
src, |
|
|
char |
stop, |
|
|
unsigned int |
cnt |
|
) |
| |
copies characters from 'src' to 'dest', copying is stopped when either the 'stop' character is reached or after 'cnt' characters have been copied, whichever comes first.
- Note
- undefined behaviuor on overlapping arrays
- Parameters
-
dest | destination pointer to copy to |
src | source pointer to copy to |
stop | character when found stop copying |
cnt | maximal number of characters to copy too |
void SCIPprintSysError |
( |
const char * |
message | ) |
|
prints an error message containing of the given string followed by a string describing the current system error; prefers to use the strerror_r method, which is threadsafe; on systems where this method does not exist, NO_STRERROR_R should be defined (see INSTALL), in this case, srerror is used which is not guaranteed to be threadsafe (on SUN-systems, it actually is)
- Parameters
-
message | first part of the error message, e.g. the filename |
char* SCIPstrtok |
( |
char * |
s, |
|
|
const char * |
delim, |
|
|
char ** |
ptrptr |
|
) |
| |
extracts tokens from strings - wrapper method for strtok_r()
- Parameters
-
s | string to parse |
delim | delimiters for parsing |
ptrptr | pointer to working char pointer - must stay the same while parsing |
void SCIPescapeString |
( |
char * |
t, |
|
|
int |
bufsize, |
|
|
const char * |
s |
|
) |
| |
translates the given string into a string where symbols ", ', and spaces are escaped with a \ prefix
- Parameters
-
t | target buffer to store escaped string |
bufsize | size of buffer t |
s | string to transform into escaped string |
int SCIPsnprintf |
( |
char * |
t, |
|
|
int |
len, |
|
|
const char * |
s, |
|
|
|
... |
|
) |
| |
safe version of snprintf
- Parameters
-
t | target string |
len | length of the string to copy |
s | source string |
SCIP_Bool SCIPstrToIntValue |
( |
const char * |
str, |
|
|
int * |
value, |
|
|
char ** |
endptr |
|
) |
| |
extract the next token as a integer value if it is one; in case no value is parsed the endptr is set to str
- Returns
- Returns TRUE if a value could be extracted, otherwise FALSE
- Parameters
-
str | string to search |
value | pointer to store the parsed value |
endptr | pointer to store the final string position if successfully parsed, otherwise str |
extract the next token as a double value if it is one; in case a value is parsed the endptr is set to str
- Returns
- Returns TRUE if a value could be extracted, otherwise FALSE
- Parameters
-
str | string to search |
value | pointer to store the parsed value |
endptr | pointer to store the final string position if successfully parsed, otherwise str |
void SCIPstrCopySection |
( |
const char * |
str, |
|
|
char |
startchar, |
|
|
char |
endchar, |
|
|
char * |
token, |
|
|
int |
size, |
|
|
char ** |
endptr |
|
) |
| |
copies the first size characters between a start and end character of str into token, if no error occured endptr will point to the position after the read part, otherwise it will point to str
- Parameters
-
str | string to search |
startchar | character which defines the beginning |
endchar | character which defines the ending |
token | string to store the copy |
size | size of the token char array |
endptr | pointer to store the final string position if successfully parsed, otherwise str |
|