gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
dc_string::index_ofs Interface Reference

Public Member Functions

integer function index_ofs (string, start, substr)

Detailed Description

Definition at line 175 of file dc_string.f90.

Constructor & Destructor Documentation

◆ index_ofs()

integer function dc_string::index_ofs::index_ofs ( character(len = *), intent(in) string,
integer, intent(in) start,
character(len = *), intent(in) substr )

Find substring position with offset

Returns the starting position where substr is found in string, searching from position start. Returns 0 if not found. The returned position is counted from the beginning of string.

Parameters
[in]stringString to search in
[in]startStarting position for search
[in]substrSubstring to find
Returns
Position of substr, or 0 if not found

Definition at line 1611 of file dc_string.f90.

1612 character(len = *), intent(in):: string
1613 integer, intent(in):: start
1614 character(len = *), intent(in):: substr
1615 intrinsic index
1616 if (start < 1) then
1617 result = 0
1618 return
1619 endif
1620 result = index(string(start: ), substr)
1621 if (result == 0) return
1622 result = start + result - 1

The documentation for this interface was generated from the following file: