libsim  Versione6.3.0

◆ cstr_to_fchar()

character(len=size(cstr)-1) function, public char_utilities::cstr_to_fchar ( integer(kind=int_b), dimension(:), intent(in)  cstr)

Converts a null-terminated C-style string into a Fortran CHARACTER variable of the same length, the null termination character is removed.

Parametri
[in]cstrvariable to be converted

Definizione alla linea 810 del file char_utilities.F90.

810 ! split the input line
811 nwords = word_split(line, this%word_start, this%word_end)
812 ! count the lines required to accomodate the input line in a paragraph
813 nlines = 0
814 nw = 0
815 DO WHILE(nw < nwords)
816  columns_in_line = 0
817  words_in_line = 0
818  DO WHILE(nw < nwords)
819  nw = nw + 1
820  ncols_next_word = this%word_end(nw) - this%word_start(nw) + 1
821  IF (words_in_line > 0) ncols_next_word = ncols_next_word + 1 ! previous space
822  IF (columns_in_line + ncols_next_word <= this%ncols .OR. &
823  words_in_line == 0) THEN ! accept the word

Generated with Doxygen.