srepeat_string_string Function

private elemental function srepeat_string_string(self, ncopies) result(repeated)

Arguments

TypeIntentOptionalAttributesName
class(string), intent(in) :: self
integer, intent(in) :: ncopies

Return Value type(string)


Called by

proc~~srepeat_string_string~~CalledByGraph proc~srepeat_string_string srepeat_string_string interface~repeat repeat interface~repeat->proc~srepeat_string_string

Contents

Source Code


Source Code

   elemental function srepeat_string_string(self, ncopies) result(repeated)
   !< Concatenates several copies of an input string.
   !<
   !<```fortran
   !< type(string) :: astring
   !< astring = 'x'
   !< print "(L1)", astring%repeat(5)//''=='xxxxx'
   !<```
   !=> T <<<
   class(string), intent(in) :: self     !< String to be repeated.
   integer,       intent(in) :: ncopies  !< Number of string copies.
   type(string)              :: repeated !< Repeated string.

   repeated%raw = repeat(string=self%raw, ncopies=ncopies)
   endfunction srepeat_string_string