SND@LHC Software
|
Analyse text string. More...
Go to the source code of this file.
Modules | |
module | mptext |
Keyword position. | |
Functions/Subroutines | |
subroutine | ratext (text, nums, dnum) |
Translate text. | |
subroutine | rltext (text, ia, ib, nab) |
Analyse text range. | |
integer(mpi) function | matint (pat, text, npat, ntext) |
Approximate string matching. | |
Variables | |
integer(mpi) | mptext::keya |
start (position) of keyword | |
integer(mpi) | mptext::keyb |
end (position) of keyword | |
Analyse text string.
Definition in file mptext.f90.
integer(mpi) function matint | ( | character (len=*), intent(in) | pat, |
character (len=*), intent(in) | text, | ||
integer(mpi), intent(out) | npat, | ||
integer(mpi), intent(out) | ntext | ||
) |
Approximate string matching.
Approximate string matching - case insensitive. Return number of matches of string PAT in string TEXT, and number NPAT, NTEXT of characters of string PAT and string TEXT. Strings are considered from first to last non-blank character.
Example:
MATCH = MATINT(' keYs ','keyWO RD',NPAT,NTEXT) returns MATCH=3, NPAT=4, NTEXT=8
[in] | pat | pattern |
[in] | text | text |
[out] | npat | number of characters in pattern |
[out] | ntext | number of characters in text |
Definition at line 289 of file mptext.f90.
subroutine ratext | ( | character (len=*), intent(in) | text, |
integer(mpi), intent(out) | nums, | ||
real(mpd), dimension(*), intent(out) | dnum | ||
) |
Translate text.
Translate TEXT into arrays of double precision numbers DNUMS(NUMS). Text preceeding numbers is TEXT(KEYA:KEYB), if KEYB >= KEYA.
[in] | text | text |
[out] | nums | number of numbers found |
[out] | dnum | array of numbers found |
Definition at line 48 of file mptext.f90.
subroutine rltext | ( | character (len=*), intent(in) | text, |
integer(mpi), intent(out) | ia, | ||
integer(mpi), intent(out) | ib, | ||
integer(mpi), intent(out) | nab | ||
) |
Analyse text range.
[in] | text | text |
[out] | ia | index of first non-blank character, or =1 |
[out] | ib | index of last non-blank character, or =0 - comment excluded |
[out] | nab | index of last non-blank character (=0 for blank text) |
Definition at line 236 of file mptext.f90.