[UP]


Manual Reference Pages  - ends_with (3)

NAME

ends_with(3f) - [M_strings:MATCH] test if string ends with specified suffix(es) (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Returns
Examples
Author
License

SYNOPSIS

function ends_with(source_string,suffix)

    or

function ends_with(source_string,[suffixs])

    character(len=*),intent(in)          :: source_string
    character(len=*),intent(in)          :: suffix
    logical                              :: ends_with

DESCRIPTION

OPTIONS

SOURCE_STRING
  string to tokenize
SUFFIX list of separator characters. May be scalar or an array.

RETURNS

ENDS_WITH
  returns .TRUE. if one of the suffix match the end of SOURCE_STRING.

EXAMPLES

Sample program:

   program demo_ends_with
   use M_strings, only : ends_with
   implicit none
      write(*,*)ends_with(’prog.a’,[’.o’,’.i’,’.s’])
      write(*,*)ends_with(’prog.f90’,[’.F90’,’.f90’])
      write(*,*)ends_with(’prog.pdf’,’.pdf’)
      write(*,*)ends_with(’prog.doc’,’.txt’)
   end program demo_ends_with

Results:

    F

    T

    T

    F

AUTHOR

John S. Urban

LICENSE

Public Domain


ends_with (3) March 11, 2021
Generated by manServer 1.08 from 3f385134-c93b-472a-8420-7980fe706f2c using man macros.