Analyse text string. More...
Go to the source code of this file.
Data Types | |
module | mptext |
Keyword position. More... |
Functions/Subroutines | |
subroutine | ratext (text, nums, dnum) |
Translate text. | |
subroutine | rltext (text, ia, ib, nab) |
Analyse text range. | |
INTEGER function | matint (pat, text, npat, ntext) |
Approximate string matching. |
Analyse text string.
Definition in file mptext.f90.
INTEGER function matint | ( | character (len=*), intent(in) | pat, |
character (len=*), intent(in) | text, | ||
integer, intent(out) | npat, | ||
integer, 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 265 of file mptext.f90.
subroutine ratext | ( | character (len=*), intent(in) | text, |
integer, intent(out) | nums, | ||
double precision, 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 26 of file mptext.f90.
subroutine rltext | ( | character (len=*), intent(in) | text, |
integer, intent(out) | ia, | ||
integer, intent(out) | ib, | ||
integer, 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 214 of file mptext.f90.