HOPS
HOPS class reference
Functions
hops::selfname Namespace Reference

Functions

constexpr const char * file_basename (const char *str)
 Returns the base name (file name without path) from a given string. More...
 
constexpr const char * r_slash (const char *str)
 Checks if a string starts with '/', recursively. More...
 
constexpr const char * str_end (const char *str)
 
constexpr bool str_slash (const char *str)
 Checks if a string starts with '/'. Used for stripping path prefix from FILE. More...
 

Function Documentation

◆ file_basename()

constexpr const char* hops::selfname::file_basename ( const char *  str)
constexpr

Returns the base name (file name without path) from a given string.

Parameters
strInput string containing file path and name.
Returns
constexpr char* representing the base name of the input string.

◆ r_slash()

constexpr const char* hops::selfname::r_slash ( const char *  str)
constexpr

Checks if a string starts with '/', recursively.

Parameters
strInput string to check.
Returns
True if string starts with '/', false otherwise.

◆ str_end()

constexpr const char* hops::selfname::str_end ( const char *  str)
constexpr

◆ str_slash()

constexpr bool hops::selfname::str_slash ( const char *  str)
constexpr

Checks if a string starts with '/'. Used for stripping path prefix from FILE.

Parameters
strInput string to check
Returns
True if string starts with '/', false otherwise