Description:
Find the
indices of the first and last non-blank characters in the given string. If the string contains
no non-blank characters, the first index is returned set to 1 and last index is returned set
to 0, i.e. "
index1"
is greater than "
index2"
.
Invocation
void chrFandl( const char
∗string, size_t
∗index1,
size_t ∗index2
)
Notes:
-
For consistency with the Fortran routine CHR_FANDL, this function only checks for spaces. Other
forms of whitespace characters such as tabs, line-feeds, etc are considered to be non-blank.
Parameters :
string
Pointer to a null terminated string holding the character string.
∗index1
Returned holding the zero-based position of first non-blank character.
∗index2
Returned holding the zero-based position of last non-blank character.
Copyright © 2018 East Asian Observatory