4.6.2 basename

string basename(char *str)

basename creates a string that consists of a copy of the specified string, but excluding any prefix that ends in /, such as a directory path. The returned string is allocated out of scratch memory, and is therefore valid only for the duration of the clause. If insufficient scratch space is available, basename does not execute and an error is generated.