TinyURDF 1.0.0
Loading...
Searching...
No Matches
utils.h File Reference
Include dependency graph for utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

using Vec3 = Eigen::Matrix< double, 3, 1 >
 Base struct for 3D position vectors.
 
using Rot3 = Eigen::Quaternion< double >
 Base struct for 3D rotation elements.
 

Functions

void str2array (const char *str_, double *arr)
 
void str2double (const char *in, double &num_)
 Converts a string to a double value in a locale-safe manner.
 
void split (const std::string &str, std::vector< std::string > &split_result, const std::string &delimiter)
 Splits a string by a delimiter into a vector of strings.
 
std::string join (const std::vector< std::string > &elements, const std::string &delimiter)
 Joins a vector of strings into a single string with a given delimiter.
 
std::string trim (const std::string &str)
 Trims leading and trailing whitespace from a string.
 
std::string toLower (const std::string &str)
 Converts a string to lowercase.
 
std::string toUpper (const std::string &str)
 Converts a string to uppercase.
 

Typedef Documentation

◆ Rot3

using Rot3 = Eigen::Quaternion<double>

Base struct for 3D rotation elements.

◆ Vec3

using Vec3 = Eigen::Matrix<double, 3, 1>

Base struct for 3D position vectors.

Function Documentation

◆ join()

std::string join ( const std::vector< std::string > &  elements,
const std::string &  delimiter 
)

Joins a vector of strings into a single string with a given delimiter.

Parameters
elementsThe vector of strings to join.
delimiterThe delimiter to insert between elements.

◆ split()

void split ( const std::string &  str,
std::vector< std::string > &  split_result,
const std::string &  delimiter 
)

Splits a string by a delimiter into a vector of strings.

Parameters
strThe input string to split.
split_resultVector to store the resulting substrings.
delimiterThe delimiter used for splitting the string.

◆ str2array()

void str2array ( const char *  str_,
double *  arr 
)

◆ str2double()

void str2double ( const char *  in,
double &  num_ 
)

Converts a string to a double value in a locale-safe manner.

◆ toLower()

std::string toLower ( const std::string &  str)

Converts a string to lowercase.

◆ toUpper()

std::string toUpper ( const std::string &  str)

Converts a string to uppercase.

◆ trim()

std::string trim ( const std::string &  str)

Trims leading and trailing whitespace from a string.