Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Source Code
elemental function replace_one_occurrence(self,old,new)result(replaced)!< Return a string with the first occurrence of substring old replaced by new.!<!< @note The doctest is not necessary, this being tested by [[string:replace]].class(string),intent(in)::self!< The string.character(kind=CK,len=*),intent(in)::old!< Old substring.character(kind=CK,len=*),intent(in)::new!< New substring.type(string)::replaced!< The string with old replaced by new.integer::pos!< Position from which replace old.if(allocated(self%raw))thenreplaced=selfpos=index(string=self%raw,substring=old)if(pos>0)then if(pos==1)thenreplaced%raw=new//self%raw(len(old)+1:)elsereplaced%raw=self%raw(1:pos-1)//new//self%raw(pos+len(old):)endif endif endif endfunction replace_one_occurrence