cnfLenf

Find the length of a FORTRAN string

Description:

Find the length (i.e. position of the last non blank character) in a FORTRAN string. This is not necessarily the same as the value of source_len as trailing blanks are not counted.

Invocation

result = cnfLenf( source_f, source_len )

Arguments

const char source_f (Given)
A pointer to the input FORTRAN string
int source_len (Given)
The length (including trailing blanks) of the input FORTRAN string

Returned Value

int cnfLenf
The length (excluding trailing blanks) of the input FORTRAN string.

Notes:

This routine follows the FORTRAN convention of counting positions from one, so with an input string of ’ABCD’ the value returned would be 4.