Manual Reference Pages  - repeat (3m_unicode)

NAME

REPEAT(3) - [M_unicode:PAD] Repeated string concatenation (LICENSE:MIT)

CONTENTS

Synopsis
Characteristics
Description
Options
Result
Examples
Standard
See Also
License

SYNOPSIS

result = repeat(string, ncopies)

   type(unicode_type) function repeat(string, ncopies)

type(unicode_type),intent(in) :: string integer(kind=**),intent(in) :: ncopies

CHARACTERISTICS

o STRING is a scalar string of type(unicode_type).
o NCOPIES is a scalar integer.
o the result is a new scalar string of type type(unicode_type)

DESCRIPTION

REPEAT(3) concatenates copies of a string.

OPTIONS

o STRING : The input string to repeat
o NCOPIES : Number of copies to make of STRING, greater than or equal to zero (0).

RESULT

A new string built up from NCOPIES copies of STRING.

EXAMPLES

Sample program:

    program demo_repeat
    use M_unicode, only : ut=>unicode_type,repeat,escape,write(formatted)
    implicit none
       write(*,’(DT)’) repeat(escape("\u2025*"), 35)
       write(*,’(DT)’) repeat(ut("_"), 70)          ! line break
       write(*,’(DT)’) repeat(ut("1234567890"), 7)  ! number line
       write(*,’(DT)’) repeat(ut("         |"), 7)  !
    end program demo_repeat

STANDARD

Fortran 95

SEE ALSO

Functions that perform operations on character strings:
o ELEMENTAL: ADJUSTL(3), ADJUSTR(3), INDEX(3), SCAN(3), VERIFY(3)
o NON-ELEMENTAL: LEN_TRIM(3), LEN(3), REPEAT(3), TRIM(3)
Fortran descriptions (license: MIT) @urbanjost

LICENSE

    MIT