Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | String to be repeated. |
||
character(kind=CK,len=*), | intent(in) | :: | rstring | String to be repeated. |
||
integer, | intent(in) | :: | ncopies | Number of string copies. |
Repeated string.
Concatenates several copies of an input string.
elemental function srepeat_character_string(self, rstring, ncopies) result(repeated)
!---------------------------------------------------------------------------------------------------------------------------------
!< Concatenates several copies of an input string.
!---------------------------------------------------------------------------------------------------------------------------------
class(string), intent(in) :: self !< String to be repeated.
character(kind=CK, len=*), intent(in) :: rstring !< String to be repeated.
integer, intent(in) :: ncopies !< Number of string copies.
type(string) :: repeated !< Repeated string.
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
repeated%raw = repeat(string=rstring, ncopies=ncopies)
return
!---------------------------------------------------------------------------------------------------------------------------------
endfunction srepeat_character_string