LEN_TRIM intrinsic function
Standard: F77 F90 F95 F2003
  Example Program
<Syntax>
LEN_TRIM ( STRING [ , KIND ] )

STRING : Character, with any kind;
KIND : scalar Integer constant expression;

Result: Integer or Integer(Kind=KIND).
<Semantics>

The LEN_TRIM intrinsic function returns the “trimmed” character length of STRING; this is the length of the string without counting trailing blanks. Like many intrinsic functions, this is elemental; the result has the same shape as STRING, with the operation being applied elementwise.

In Fortran 2003, the KIND argument should be used when the length might exceed the range of a default integer; this is only relevant to 64-bit Windows as the ABI on 32-bit platforms and 64-bit Linux limit the maximum character length to 2GB-1.

<Related>
CHARACTER type, LEN intrinsic function, TRIM intrinsic function.