Processing math: 100%

chrFandl

Find the first and last non-blank characters in a string

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:

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.