LEN — Length of a character entity#
- 
LEN(STRING, KIND)#
- Returns the length of a character string. If - STRINGis an array, the length of an element of- STRINGis returned. Note that- STRINGneed not be defined when this intrinsic is invoked, since only the length, not the content, of- STRINGis needed.- Parameters
- STRING – Shall be a scalar or array of type - CHARACTER, with- INTENT(IN)
- KIND – (Optional) An - INTEGERinitialization expression indicating the kind parameter of the result.
 
- Returns
- The return value is of type - INTEGERand of kind- KIND. If- KINDis absent, the return value is of default integer kind.
 - Standard:
- Fortran 77 and later, with - KINDargument Fortran 2003 and later
- Class:
- Inquiry function 
- Syntax:
- L = LEN(STRING [, KIND]) 
- Specific names:
- Name - Argument - Return type - Standard - LEN(STRING)- CHARACTER- INTEGER- Fortran 77 and later 
- See also:
- LEN_TRIM — Length of a character entity without trailing blank characters, ADJUSTL — Left adjust a string, ADJUSTR — Right adjust a string