mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-05 17:01:17 -05:00
c6544d05c3
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/jtms3@2528 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
29 lines
490 B
Fortran
29 lines
490 B
Fortran
subroutine match(s1,s2,nstart,nmatch)
|
|
|
|
character*(*) s1,s2
|
|
character s1a*29
|
|
|
|
nstart=-1
|
|
nmatch=0
|
|
n1=len_trim(s1)+1
|
|
n2=len(s2)
|
|
s1a=s1//' '
|
|
if(n2.ge.n1) then
|
|
do j=1,n2
|
|
n=0
|
|
do i=1,n1
|
|
k=j+i-1
|
|
if(k.gt.n2) k=k-n2
|
|
if(s2(k:k).eq.s1a(i:i)) n=n+1
|
|
enddo
|
|
if(n.gt.nmatch) then
|
|
nmatch=n
|
|
nstart=j
|
|
endif
|
|
enddo
|
|
endif
|
|
|
|
return
|
|
end subroutine match
|
|
|