slice Interface

public interface slice

Extracts characters from the input string to return a new string

Version: experimental

Calls

interface~~slice~~CallsGraph interface~slice slice proc~slice_char slice_char interface~slice->proc~slice_char proc~slice_string slice_string interface~slice->proc~slice_string proc~slice_string->interface~slice

Called by

interface~~slice~~CalledByGraph interface~slice slice proc~slice_string slice_string interface~slice->proc~slice_string proc~slice_string->interface~slice

Module Procedures

private elemental function slice_string(string, first, last, stride) result(sliced_string)

Extract the characters from the region between ‘first’ and ‘last’ index (both inclusive) of the input ‘string’ by taking strides of length ‘stride’ Returns a new string

Arguments

Type IntentOptional Attributes Name
type(string_type), intent(in) :: string
integer, intent(in), optional :: first
integer, intent(in), optional :: last
integer, intent(in), optional :: stride

Return Value type(string_type)

private pure function slice_char(string, first, last, stride) result(sliced_string)

Extract the characters from the region between ‘first’ and ‘last’ index (both inclusive) of the input ‘string’ by taking strides of length ‘stride’ Returns a new string

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: string
integer, intent(in), optional :: first
integer, intent(in), optional :: last
integer, intent(in), optional :: stride

Return Value character(len=:), allocatable