Linear Methods for Image Interpolation
|
String utility functions. More...
Go to the source code of this file.
Functions | |
int | EatWhitespace (const char **StrPtr) |
Eat whitespace characters in a string. More... | |
int | ParseNumber (double *Number, const char **StrPtr, int FloatAllowed) |
Read a number from a string. More... | |
String utility functions.
Copyright (c) 2011, Pascal Getreuer All rights reserved.
This program is free software: you can use, modify and/or redistribute it under the terms of the simplified BSD License. You should have received a copy of this license along this program. If not, see http://www.opensource.org/licenses/bsd-license.html.
Definition in file strutil.h.
int EatWhitespace | ( | const char ** | StrPtr | ) |
Eat whitespace characters in a string.
StrPtr | char** pointing to a pointer to the character array |
This function advances a pointer to a string to consume as much whitespace as possible. Upon returning, *StrPos points to the first non-space character. If the string terminates without a non-space character, *StrPos is the location of the null terminator.
Definition at line 31 of file strutil.c.
int ParseNumber | ( | double * | Number, |
const char ** | StrPtr, | ||
int | FloatAllowed | ||
) |
Read a number from a string.
Number | is a pointer to where to store the result |
StrPtr | char** pointing to a pointer to the character array |
FloatAllowed | whether decimal or scientific notations are allowed |
The routine consumes leading whitespace and reads as many characters as possible to form a valid floating-point number in decimal or scientific notation. Upon returning, *StrPos points to the character immediately following the number.
Definition at line 55 of file strutil.c.