Skip to content

Commit

Permalink
Merge pull request #507 from Sideboard/xml_config_string
Browse files Browse the repository at this point in the history
GAP: Add config string to XML
  • Loading branch information
albapa authored Nov 21, 2022
2 parents 7075b75 + 2a9a333 commit bdedae8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/GAP
19 changes: 19 additions & 0 deletions src/libAtoms/System.f95
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,9 @@ subroutine c_mem_info(total_mem,free_mem)
public :: string_to_real
public :: string_to_int
public :: string_to_logical
public :: upper_case
public :: lower_case
public :: replace
public :: split_string
public :: parse_string
public :: linebreak_string
Expand Down Expand Up @@ -3611,6 +3613,23 @@ pure function lower_case(word)
end do
end function lower_case

pure function replace(string, search, substitute) result(res)
character(len=*), intent(in) :: string
character(len=1), intent(in) :: search, substitute
character(len=len(string)) :: res

integer :: i

i = 1
do i = 1, len(string)
if (string(i:i) == search) then
res(i:i) = substitute
else
res(i:i) = string(i:i)
end if
end do
end function replace

!% Print a progress bar
subroutine progress(total,current, name)
integer, intent(in) :: total, current
Expand Down

0 comments on commit bdedae8

Please sign in to comment.