FLASH-X
Doxygen Generated Documentation From Interface Source Code
Functions/Subroutines
findWords.F90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine findWords (string, first, last, n, nwords)
 

Function/Subroutine Documentation

◆ findWords()

subroutine findWords ( character(len=*), intent(inout)  string,
integer, dimension(n), intent(inout)  first,
integer, dimension(n), intent(inout)  last,
integer, intent(in)  n,
integer, intent(inout)  nwords 
)

Given an input string, return the character positions of the beginnings and endings of all words in the string. Also return the number of words found.

What constitutes a word:

<delimiter>characters<delimiter> symbol (single character) <delimiter>characters<end-of-line> <beg-of-line>characters<delimiter>

Symbols also function as delimiters.

string – input string first(n)– array of character positions of the beginning of all words in string last(n) – array of character positions of the end of all words in string n – size of arrays first and last nwords – number of words found in the string

Definition at line 40 of file findWords.F90.