slice_string Function

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)


Calls

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

Called by

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

Source Code

   elemental function slice_string(string, first, last, stride) result(sliced_string)
      type(string_type), intent(in) :: string
      integer, intent(in), optional :: first, last, stride
      type(string_type) :: sliced_string

      sliced_string = string_type(slice(char(string), first, last, stride))

   end function slice_string