nlsr::util Namespace Reference

Functions

bool diffInEpsilon (double lhs, double rhs)
 Determine whether the difference between two numbers are within epsilon. More...
 
int32_t getNameComponentPosition (const ndn::Name &name, const std::string &searchString)
 search a name component in ndn::Name and return the position of the component More...
 

Function Documentation

◆ diffInEpsilon()

bool nlsr::util::diffInEpsilon ( double  lhs,
double  rhs 
)
inline

Determine whether the difference between two numbers are within epsilon.

Parameters
lhsfirst number.
rhssecond number.
Returns
true if their difference is within epsilon.

Definition at line 36 of file numeric.hpp.

◆ getNameComponentPosition()

int32_t nlsr::util::getNameComponentPosition ( const ndn::Name &  name,
const std::string &  searchString 
)
inline

search a name component in ndn::Name and return the position of the component

Parameters
namewhere to search the searchString
searchStringthe string to search in name
Returns
-1 if searchString not found else return the position starting from 0

Definition at line 38 of file name-helper.hpp.