@@ -52,18 +52,18 @@ module stdlib_string_type
52
52
53
53
!> Constructor for new string instances
54
54
interface string_type
55
- pure elemental module function new_string(string) result(new)
55
+ elemental module function new_string(string) result(new)
56
56
character(len=*), intent(in), optional :: string
57
57
type(string_type) :: new
58
58
end function new_string
59
59
#: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)
61
61
integer(${kind}$), intent(in) :: val
62
62
type(string_type) :: new
63
63
end function new_string_from_integer_${kind}$
64
64
#:endfor
65
65
#: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)
67
67
logical(${kind}$), intent(in) :: val
68
68
type(string_type) :: new
69
69
end function new_string_from_logical_${kind}$
@@ -438,7 +438,7 @@ contains
438
438
439
439
440
440
!> 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)
442
442
type(string_type), intent(in) :: string
443
443
character(len=len(string)) :: character_string
444
444
@@ -457,7 +457,7 @@ contains
457
457
end function char_string_pos
458
458
459
459
!> 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)
461
461
type(string_type), intent(in) :: string
462
462
integer, intent(in) :: start
463
463
integer, intent(in) :: last
@@ -678,7 +678,7 @@ contains
678
678
679
679
!> Moves the allocated character scalar from 'from' to 'to'
680
680
!> No output
681
- subroutine move_string_string(from, to)
681
+ elemental subroutine move_string_string(from, to)
682
682
type(string_type), intent(inout) :: from
683
683
type(string_type), intent(out) :: to
684
684
@@ -688,7 +688,7 @@ contains
688
688
689
689
!> Moves the allocated character scalar from 'from' to 'to'
690
690
!> No output
691
- subroutine move_string_char(from, to)
691
+ pure subroutine move_string_char(from, to)
692
692
type(string_type), intent(inout) :: from
693
693
character(len=:), intent(out), allocatable :: to
694
694
@@ -698,7 +698,7 @@ contains
698
698
699
699
!> Moves the allocated character scalar from 'from' to 'to'
700
700
!> No output
701
- subroutine move_char_string(from, to)
701
+ pure subroutine move_char_string(from, to)
702
702
character(len=:), intent(inout), allocatable :: from
703
703
type(string_type), intent(out) :: to
704
704
@@ -708,7 +708,7 @@ contains
708
708
709
709
!> Moves the allocated character scalar from 'from' to 'to'
710
710
!> No output
711
- subroutine move_char_char(from, to)
711
+ pure subroutine move_char_char(from, to)
712
712
character(len=:), intent(inout), allocatable :: from
713
713
character(len=:), intent(out), allocatable :: to
714
714
@@ -1233,7 +1233,7 @@ contains
1233
1233
1234
1234
1235
1235
!> 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)
1237
1237
type(string_type), intent(in) :: string
1238
1238
character(len=len(string)) :: maybe_string
1239
1239
if (allocated(string%raw)) then
0 commit comments