svn_relpath_basename

Function svn_relpath_basename 

Source
pub unsafe extern "C" fn svn_relpath_basename(
    relpath: *const c_char,
    result_pool: *mut apr_pool_t,
) -> *const c_char
Expand description

Get the basename of the specified canonicalized @a relpath. The basename is defined as the last component of the relpath. If the @a relpath has only one component then that is returned. The returned value will have no slashes in it.

Example: svn_relpath_basename(“/trunk/foo/bar”) -> “bar”

If @a result_pool is NULL, return a pointer to the basename in @a relpath, otherwise allocate the result in @a result_pool.

@note If an empty string is passed, then an empty string will be returned.

@since New in 1.7.