You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns the index at which occurrence'th occurrence of substring pattern is present in the input string string
between the index start and end, if not found returns 0. consider_overlapping: comment #1 & comment #2
Prior Art
Fortran has an intrinsic function index (description) which does the same thing but has limited features.
PS: Some of the features proposed above may not be best to add to the stdlib at this moment, hence there is also a need to discuss the importance of these features. They are added in the issue to bring them into the discussion.
The text was updated successfully, but these errors were encountered:
A higher level implementation of find function (based upon KMP algorithm) can be found here.
occurrence argument helps to find the nth occurrence the user is looking for. It also provides an option to consider_overlapping substrings or not while finding the nth occurrence.
Description
Signature: find(string, pattern, start(Optional) =
1
, end(Optional) =len(string)
, occurrence(Optional) =1
, consider_overlapping(Optional)=.true.
)Output: an integer (index)
Returns the index at which
occurrence
'th occurrence of substringpattern
is present in the input stringstring
between the index
start
andend
, if not found returns0
.consider_overlapping
: comment #1 & comment #2Prior Art
Fortran has an intrinsic function
index
(description) which does the same thing but has limited features.PS: Some of the features proposed above may not be best to add to the stdlib at this moment, hence there is also a need to discuss the importance of these features. They are added in the issue to bring them into the discussion.
The text was updated successfully, but these errors were encountered: