libsim  Versione7.2.6

◆ align_center()

elemental character(len=len(input_string)) function, public char_utilities::align_center ( character(len=*), intent(in)  input_string)

Returns input_string centered, i.e. with an equal number of leading and trailing blanks (±1 if they are odd).

The needed number of leading/trailing blanks is added or removed at the beginning and/or at the end in order to keep the length of the resulting string equal to the input length.

Parametri
[in]input_stringstring to be aligned

Definizione alla linea 857 del file char_utilities.F90.

857  transfer(line(this%word_start(nw):this%word_end(nw)), this%paragraph)
858  ENDIF
859  ELSE ! truncated line (word longer than line)
860  this%paragraph(1:this%ncols,nlines+1) = &
861  transfer(line(this%word_start(nw):this%word_start(nw)+this%ncols-1), this%paragraph)
862  ENDIF
863  words_in_line = words_in_line + 1
864  ELSE ! refuse the word
865  nw = nw - 1
866  EXIT
867  ENDIF
868  ENDDO

Generated with Doxygen.