repeat(3f) - [FORTRAN:INTRINSIC:CHARACTER] Repeated string concatenation
result = repeat(string, ncopies)
Concatenates NCOPIES copies of a string.
STRING Shall be scalar and of type CHARACTER. NCOPIES Shall be scalar and of type INTEGER.
A new scalar of type CHARACTER built up from NCOPIES copies of STRING.
Sample program:
program demo_repeat implicit none write(*,*) repeat("x", 5) ! "xxxxx" end program demo_repeat
[[Fortran 95]] and later
Transformational function
Functions that perform operations on character strings, return lengths of arguments, and search for certain arguments:
Elemental: adjustl(3), adjustr(3), index(3), len_trim(3), scan(3), verify(3) Nonelemental: repeat(3), trim(3)
repeat (3) | March 11, 2021 |