函数
GLibstrrstr_len
声明 [src]
gchar*
g_strrstr_len (
const gchar* haystack,
gssize haystack_len,
const gchar* needle
)
描述 [src]
搜索字符串 haystack 中字符串 needle 最后一次出现的位置,搜索长度限制为 haystack_len。
这个函数返回 gchar * 而不是 const gchar * 是有历史原因的。
参数
haystack-
类型:
const gchar*要在其中进行搜索的字符串。
其数据归函数调用方所有。 该值是一个以 NUL 结尾的 UTF-8 字符串。 haystack_len-
类型:
gssizehaystack的最大长度,单位为字节。长度设置为-1表示“搜索整个字符串”,如同g_strrstr()。 needle-
类型:
const gchar*要搜索的字符串。
其数据归函数调用方所有。 该值是一个以 NUL 结尾的 UTF-8 字符串。