Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pop, drop & get with basic range feature for stringlist #514

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
933a367
resolved inserting 0 lengthed slist in list bug
aman-godara Oct 10, 2021
ea46f19
changed name
aman-godara Oct 10, 2021
c790494
added delete function for stringlist
aman-godara Sep 6, 2021
e446e7a
completed TODO by adding move subroutine
aman-godara Sep 6, 2021
bfad13d
renamed delete to pop, created subroutine drop
aman-godara Sep 12, 2021
00de2b7
fixed an error in documentation of stringlist
aman-godara Sep 12, 2021
92d5f0d
created a new subroutine pop_positions
aman-godara Sep 12, 2021
1468fb6
added range functions for pop and drop
aman-godara Sep 12, 2021
937fac2
corrected a typo
aman-godara Sep 12, 2021
f60dd9e
corrected errors in documentation
aman-godara Sep 13, 2021
88a1abb
added range feature for get, added shift function
aman-godara Sep 13, 2021
ccd6dff
made move subroutine of stdlib_string_type module pure
aman-godara Sep 13, 2021
2e216c8
some minor changes
aman-godara Sep 15, 2021
5d24c0c
rename capture_popped to popped_strings
aman-godara Sep 17, 2021
48c94dc
renamed to popped_strings all over the function
aman-godara Sep 17, 2021
980c18a
removing redundant naming convention
aman-godara Sep 26, 2021
e935ea1
improved append operator's performance
aman-godara Sep 26, 2021
e34cce2
changed naming convention throughout the module
aman-godara Sep 26, 2021
2b3a5ef
some minor improvements
aman-godara Oct 15, 2021
29f9880
Minor refactoring
aman-godara Dec 25, 2021
207c1fb
Add strides feature to get function
aman-godara Dec 26, 2021
e6b6143
Add get_impl interface in the middle
aman-godara Dec 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/specs/stdlib_stringlist_type.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ program demo_equality_operator
res = ( stringlist == ["#4", "#3", "#2", "#1"] )
! res <-- .true.

print'(a)', stringlist == ["#4", "#3", "#1"]
print'(l0)', stringlist == ["#4", "#3", "#1"]
! .false.

end program demo_equality_operator
Expand Down Expand Up @@ -491,7 +491,7 @@ program demo_inequality_operator
res = ( stringlist /= ["#111", "#222", "#333", "#444"] )
! res <-- .true.

print'(a)', stringlist /= ["#4", "#3", "#1"]
print'(l0)', stringlist /= ["#4", "#3", "#1"]
! .true.

end program demo_inequality_operator
Expand Down
8 changes: 4 additions & 4 deletions doc/specs/stdlib_strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ The result is of scalar logical type.
program demo
use stdlib_strings, only : starts_with
implicit none
print'(a)', starts_with("pattern", "pat") ! T
print'(a)', starts_with("pattern", "ern") ! F
print'(l0)', starts_with("pattern", "pat") ! T
print'(l0)', starts_with("pattern", "ern") ! F
end program demo
```

Expand Down Expand Up @@ -188,8 +188,8 @@ The result is of scalar logical type.
program demo
use stdlib_strings, only : ends_with
implicit none
print'(a)', ends_with("pattern", "ern") ! T
print'(a)', ends_with("pattern", "pat") ! F
print'(l0)', ends_with("pattern", "ern") ! T
print'(l0)', ends_with("pattern", "pat") ! F
end program demo
```

Expand Down
8 changes: 4 additions & 4 deletions src/stdlib_string_type.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ contains

!> Moves the allocated character scalar from 'from' to 'to'
!> No output
subroutine move_string_string(from, to)
pure subroutine move_string_string(from, to)
type(string_type), intent(inout) :: from
type(string_type), intent(out) :: to

Expand All @@ -688,7 +688,7 @@ contains

!> Moves the allocated character scalar from 'from' to 'to'
!> No output
subroutine move_string_char(from, to)
pure subroutine move_string_char(from, to)
type(string_type), intent(inout) :: from
character(len=:), intent(out), allocatable :: to

Expand All @@ -698,7 +698,7 @@ contains

!> Moves the allocated character scalar from 'from' to 'to'
!> No output
subroutine move_char_string(from, to)
pure subroutine move_char_string(from, to)
character(len=:), intent(inout), allocatable :: from
type(string_type), intent(out) :: to

Expand All @@ -708,7 +708,7 @@ contains

!> Moves the allocated character scalar from 'from' to 'to'
!> No output
subroutine move_char_char(from, to)
pure subroutine move_char_char(from, to)
character(len=:), intent(inout), allocatable :: from
character(len=:), intent(out), allocatable :: to

Expand Down
Loading