chomp 接口

公共接口 chomp

从字符串中删除集合中的尾随字符。如果没有提供字符集,则删除尾随空格。

版本:实验性


模块过程

私有纯函数 chomp_string(string) result(chomped_string)

从字符串中删除集合中的尾随字符。默认字符集变体,其中删除尾随空格。

参数

类型 意图可选 属性 名称
type(string_type), intent(in) :: string

返回值 type(string_type)

私有纯函数 chomp_char(string) result(chomped_string)

从字符串中删除集合中的尾随字符。默认字符集变体,其中删除尾随空格。

参数

类型 意图可选 属性 名称
character(len=*), intent(in) :: string

返回值 character(len=:), allocatable

私有纯函数 chomp_set_string_char(string, set) result(chomped_string)

从字符串中删除集合中的尾随字符。

参数

类型 意图可选 属性 名称
type(string_type), intent(in) :: string
character(len=1), intent(in) :: set(:)

返回值 type(string_type)

私有纯函数 chomp_set_char_char(string, set) result(chomped_string)

从字符串中删除集合中的尾随字符。

参数

类型 意图可选 属性 名称
character(len=*), intent(in) :: string
character(len=1), intent(in) :: set(:)

返回值 character(len=:), allocatable

私有纯函数 chomp_substring_string_string(string, substring) result(chomped_string)

从字符串中删除尾随子字符串。

参数

类型 意图可选 属性 名称
type(string_type), intent(in) :: string
type(string_type), intent(in) :: substring

返回值 type(string_type)

私有纯函数 chomp_substring_char_string(string, substring) result(chomped_string)

从字符串中删除尾随子字符串。

参数

类型 意图可选 属性 名称
character(len=*), intent(in) :: string
type(string_type), intent(in) :: substring

返回值 character(len=:), allocatable

私有纯函数 chomp_substring_string_char(string, substring) result(chomped_string)

从字符串中删除尾随子字符串。

参数

类型 意图可选 属性 名称
type(string_type), intent(in) :: string
character(len=*), intent(in) :: substring

返回值 type(string_type)

私有纯函数 chomp_substring_char_char(string, substring) result(chomped_string)

从字符串中删除尾随子字符串。

参数

类型 意图可选 属性 名称
character(len=*), intent(in) :: string
character(len=*), intent(in) :: substring

返回值 character(len=:), allocatable