fndnwd |
Table of contents
ProcedureFNDNWD ( Find the next word after an index ) SUBROUTINE FNDNWD ( STRING, START, B, E ) AbstractFind the beginning and end of the first word starting at or after a specified character. Required_ReadingNone. KeywordsPARSING SEARCH WORD DeclarationsIMPLICIT NONE CHARACTER*(*) STRING INTEGER START INTEGER B INTEGER E Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- STRING I A string to examine for words. START I Position in the string to start looking for words. B O String position of first character of the word. E O String position of last character of the word. Detailed_InputSTRING is a character string that potentially consists of words of text. START is the index of a letter within the string from which to start looking for the next word. Detailed_OutputB is the index of the first letter of the word substring of STRING that begins at or after position START. If there are no such substrings I is returned as 0. E is the index of the last letter of the word substring of STRING that begins at or after position START. If there are no such substrings J is returned as 0. ParametersNone. ExceptionsError free. FilesNone. ParticularsGiven a character string and location of a character within that string, this routine finds the first full word of the string that starts on or after the specified location. Examples1 2 3 4 5 12345678901234567890123456789012345678901234567890 STRING: 'Now is the time for all good men to go home to bed' START I J ----- --- --- 1 1 3 2 5 6 3 5 6 4 5 6 5 5 6 6 8 10 7 8 10 8 8 10 9 12 15 48 48 50 49 0 0 111 0 0 RestrictionsNone. Literature_ReferencesNone. Author_and_InstitutionJ. Diaz del Rio (ODC Space) W.L. Taber (JPL) VersionSPICELIB Version 2.1.0, 12-AUG-2021 (JDR) Added IMPLICIT NONE statement. Edited the header to comply with NAIF standard. SPICELIB Version 2.0.0, 15-OCT-1993 (WLT) The routine was completely rewritten with a resulting increase in execution speed of between 2000% and 6000%. SPICELIB Version 1.0.1, 10-MAR-1992 (WLT) Comment section for permuted index source lines was added following the header. SPICELIB Version 1.0.0, 31-JAN-1990 (WLT) |
Fri Dec 31 18:36:22 2021