|
◆ line_split_new()
type(line_split) function, public char_utilities::line_split_new |
( |
character(len=*), intent(in) |
line, |
|
|
integer, intent(in), optional |
ncols |
|
) |
| |
Constructor for the line_split class.
It creates a new object allowing to split a line of text into multiple lines of predefined length at blank spaces. If a line can't be splitted because a word is longer than the line, it is truncated. - Parametri
-
[in] | line | line to be splitted |
[in] | ncols | maximum number of columns on every line, if not provided a suitable default is used |
Definizione alla linea 995 del file char_utilities.F90.
999 deallocate(igoodchar)
1009 if ( present(badchar)) then
1011 allocate(ibadchar(len(badchar)))
1013 do i =1, len(badchar)
1014 ibadchar=ichar(badchar(i:i))
1019 ia = ichar(charrr(i:i))
1020 if (.not. any(ia == ibadchar)) then
1022 charr(nchar:nchar)=achar(ia)
1026 deallocate(ibadchar)
1035 if (.not. present(goodchar) .and. .not. present(badchar)) then
1039 ia = ichar(charr(i:i))
1040 if ((ia >= 65 .and. ia <= 90) .or. &
1041 (ia >= 97 .and. ia <= 122)) then
1043 char(nchar:nchar)=achar(ia)
1054 END FUNCTION wash_char
|