@@ -52,18 +52,18 @@ module stdlib_string_type
5252
5353 !> Constructor for new string instances
5454 interface string_type
55- pure elemental module function new_string(string) result(new)
55+ elemental module function new_string(string) result(new)
5656 character(len=*), intent(in), optional :: string
5757 type(string_type) :: new
5858 end function new_string
5959 #:for kind in INT_KINDS
60- pure elemental module function new_string_from_integer_${kind}$(val) result(new)
60+ elemental module function new_string_from_integer_${kind}$(val) result(new)
6161 integer(${kind}$), intent(in) :: val
6262 type(string_type) :: new
6363 end function new_string_from_integer_${kind}$
6464 #:endfor
6565 #:for kind in LOG_KINDS
66- pure elemental module function new_string_from_logical_${kind}$(val) result(new)
66+ elemental module function new_string_from_logical_${kind}$(val) result(new)
6767 logical(${kind}$), intent(in) :: val
6868 type(string_type) :: new
6969 end function new_string_from_logical_${kind}$
@@ -438,7 +438,7 @@ contains
438438
439439
440440 !> Return the character sequence represented by the string.
441- pure function char_string(string) result(character_string)
441+ elemental function char_string(string) result(character_string)
442442 type(string_type), intent(in) :: string
443443 character(len=len(string)) :: character_string
444444
@@ -457,7 +457,7 @@ contains
457457 end function char_string_pos
458458
459459 !> Return the character sequence represented by the string.
460- pure function char_string_range(string, start, last) result(character_string)
460+ elemental function char_string_range(string, start, last) result(character_string)
461461 type(string_type), intent(in) :: string
462462 integer, intent(in) :: start
463463 integer, intent(in) :: last
@@ -678,7 +678,7 @@ contains
678678
679679 !> Moves the allocated character scalar from 'from' to 'to'
680680 !> No output
681- subroutine move_string_string(from, to)
681+ elemental subroutine move_string_string(from, to)
682682 type(string_type), intent(inout) :: from
683683 type(string_type), intent(out) :: to
684684
@@ -688,7 +688,7 @@ contains
688688
689689 !> Moves the allocated character scalar from 'from' to 'to'
690690 !> No output
691- subroutine move_string_char(from, to)
691+ pure subroutine move_string_char(from, to)
692692 type(string_type), intent(inout) :: from
693693 character(len=:), intent(out), allocatable :: to
694694
@@ -698,7 +698,7 @@ contains
698698
699699 !> Moves the allocated character scalar from 'from' to 'to'
700700 !> No output
701- subroutine move_char_string(from, to)
701+ pure subroutine move_char_string(from, to)
702702 character(len=:), intent(inout), allocatable :: from
703703 type(string_type), intent(out) :: to
704704
@@ -708,7 +708,7 @@ contains
708708
709709 !> Moves the allocated character scalar from 'from' to 'to'
710710 !> No output
711- subroutine move_char_char(from, to)
711+ pure subroutine move_char_char(from, to)
712712 character(len=:), intent(inout), allocatable :: from
713713 character(len=:), intent(out), allocatable :: to
714714
@@ -1233,7 +1233,7 @@ contains
12331233
12341234
12351235 !> Safely return the character sequences represented by the string
1236- pure function maybe(string) result(maybe_string)
1236+ elemental function maybe(string) result(maybe_string)
12371237 type(string_type), intent(in) :: string
12381238 character(len=len(string)) :: maybe_string
12391239 if (allocated(string%raw)) then
0 commit comments